From 5a7dc2d1c0e279a640558608ebdce98ac887c336 Mon Sep 17 00:00:00 2001 From: Ian Schmitz Date: Sun, 10 Feb 2019 10:59:41 -0800 Subject: [PATCH] Revert "Check for multiple project names when initializing (#6080)" This reverts commit a78be99b5e64208a303d65101da3b832fcc96a95. --- packages/create-react-app/createReactApp.js | 23 +++++---------------- 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/packages/create-react-app/createReactApp.js b/packages/create-react-app/createReactApp.js index 356d886556f..ff4beff99a2 100755 --- a/packages/create-react-app/createReactApp.js +++ b/packages/create-react-app/createReactApp.js @@ -143,24 +143,11 @@ if (program.info) { .then(console.log); } -const hasMultipleProjectNameArgs = - process.argv[3] && !process.argv[3].startsWith('-'); -if (typeof projectName === 'undefined' || hasMultipleProjectNameArgs) { - console.log(); - if (hasMultipleProjectNameArgs) { - console.error( - `You have provided more than one argument for ${chalk.green( - '' - )}.` - ); - console.log(); - console.log('Please specify only one project directory, without spaces.'); - } else { - console.error('Please specify the project directory:'); - console.log( - ` ${chalk.cyan(program.name())} ${chalk.green('')}` - ); - } +if (typeof projectName === 'undefined') { + console.error('Please specify the project directory:'); + console.log( + ` ${chalk.cyan(program.name())} ${chalk.green('')}` + ); console.log(); console.log('For example:'); console.log(` ${chalk.cyan(program.name())} ${chalk.green('my-react-app')}`);