From 8d3bbdf8e62e030d85057af2ad9ada821121aa0b Mon Sep 17 00:00:00 2001 From: Nick Simmons Date: Wed, 7 Oct 2015 17:39:22 -0400 Subject: [PATCH] [cli] make init backwards-compatible for real --- local-cli/init.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local-cli/init.js b/local-cli/init.js index e08bf48c9..0843c5f54 100755 --- a/local-cli/init.js +++ b/local-cli/init.js @@ -7,7 +7,7 @@ function init(projectDir, argsOrName) { console.log('Setting up new React Native app in ' + projectDir); var env = yeoman.createEnv(); env.register(require.resolve(path.join(__dirname, 'generator')), 'react:app'); - var args = Array.isArray(argsOrName) ? argsOrName : [argsOrName].concat(process.args.slice(4)); + var args = Array.isArray(argsOrName) ? argsOrName : [argsOrName].concat(process.argv.slice(4)); var generator = env.create('react:app', {args: args}); generator.destinationRoot(projectDir); generator.run();