Skip to content

Commit

Permalink
Revert "Check for multiple project names when initializing (#6080)"
Browse files Browse the repository at this point in the history
This reverts commit a78be99.
  • Loading branch information
ianschmitz committed Feb 10, 2019
1 parent 4c02980 commit 5a7dc2d
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions packages/create-react-app/createReactApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
'<project-directory>'
)}.`
);
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('<project-directory>')}`
);
}
if (typeof projectName === 'undefined') {
console.error('Please specify the project directory:');
console.log(
` ${chalk.cyan(program.name())} ${chalk.green('<project-directory>')}`
);
console.log();
console.log('For example:');
console.log(` ${chalk.cyan(program.name())} ${chalk.green('my-react-app')}`);
Expand Down

0 comments on commit 5a7dc2d

Please sign in to comment.