From 89a486eb3bd078b9a277bc0f1076dcaebd3d668f Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Sun, 6 Mar 2016 18:55:44 -0800 Subject: [PATCH] Fix: cli.js - use var instead of const Summary:Explain the **motivation** for making this change. What existing problem does the pull request solve? Fixes https://github.com/facebook/react-native/issues/6203 > SyntaxError: Use of const in strict mode. - The rest of the file isn't using es6 anyway and babel-register is run on the file it's included in **Test plan (required)** Shouldn't have issues replacing it since it's used right after one time. Closes https://github.com/facebook/react-native/pull/6329 Differential Revision: D3017697 Pulled By: martinbigio fb-gh-sync-id: 42ee011d032a4bae3409b8e7793c9eb508719964 shipit-source-id: 42ee011d032a4bae3409b8e7793c9eb508719964 --- local-cli/cli.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local-cli/cli.js b/local-cli/cli.js index ace3251d764..1e22cb29e6c 100644 --- a/local-cli/cli.js +++ b/local-cli/cli.js @@ -71,7 +71,7 @@ function run() { printUsage(); } - const setupEnvScript = /^win/.test(process.platform) + var setupEnvScript = /^win/.test(process.platform) ? 'setup_env.bat' : 'setup_env.sh'; childProcess.execFileSync(path.join(__dirname, setupEnvScript));