From e4bc8a9265f6e6ba2cb801612c65dbe49a953b05 Mon Sep 17 00:00:00 2001 From: Ewan Harris Date: Tue, 9 Feb 2021 16:06:03 +0000 Subject: [PATCH] fix: declare i18n function before its usage --- iphone/cli/hooks/run.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/iphone/cli/hooks/run.js b/iphone/cli/hooks/run.js index 4f637550c73..44eac999326 100644 --- a/iphone/cli/hooks/run.js +++ b/iphone/cli/hooks/run.js @@ -17,15 +17,16 @@ exports.init = function (logger, config, cli) { return finished(); } + const i18n = require('node-appc').i18n(__dirname); + const __ = i18n.__; + const __n = i18n.__n; + if (cli.argv['build-only']) { logger.info(__('Performed build only, skipping running of the application')); return finished(); } const ioslib = require('ioslib'); - const i18n = require('node-appc').i18n(__dirname); - const __ = i18n.__; - const __n = i18n.__n; const path = require('path'); const fs = require('fs-extra'); // eslint-disable-next-line security/detect-child-process