From d62dc7a4ec0458da8803bfcb89b26b76c2a8a9f7 Mon Sep 17 00:00:00 2001 From: lpalmes Date: Tue, 28 Feb 2017 19:59:37 -0300 Subject: [PATCH] Removes false module from dependencies when creating a new project --- packages/create-react-app/index.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/create-react-app/index.js b/packages/create-react-app/index.js index fda95f1c041..e3db7131759 100755 --- a/packages/create-react-app/index.js +++ b/packages/create-react-app/index.js @@ -163,9 +163,13 @@ function install(useYarn, dependencies, verbose, isOnline) { command = 'yarnpkg'; args = [ 'add', - '--exact', - isOnline === false && '--offline' - ].concat(dependencies); + '--exact' + ]; + + if (isOnline === false) + args.append('--offline'); + + args = args.concat(dependencies); if (!isOnline) { console.log(chalk.yellow('You appear to be offline.'));