Skip to content

Commit 5a7dc2d

Browse files
committed
Revert "Check for multiple project names when initializing (#6080)"
This reverts commit a78be99.
1 parent 4c02980 commit 5a7dc2d

File tree

1 file changed

+5
-18
lines changed

1 file changed

+5
-18
lines changed

packages/create-react-app/createReactApp.js

+5-18
Original file line numberDiff line numberDiff line change
@@ -143,24 +143,11 @@ if (program.info) {
143143
.then(console.log);
144144
}
145145

146-
const hasMultipleProjectNameArgs =
147-
process.argv[3] && !process.argv[3].startsWith('-');
148-
if (typeof projectName === 'undefined' || hasMultipleProjectNameArgs) {
149-
console.log();
150-
if (hasMultipleProjectNameArgs) {
151-
console.error(
152-
`You have provided more than one argument for ${chalk.green(
153-
'<project-directory>'
154-
)}.`
155-
);
156-
console.log();
157-
console.log('Please specify only one project directory, without spaces.');
158-
} else {
159-
console.error('Please specify the project directory:');
160-
console.log(
161-
` ${chalk.cyan(program.name())} ${chalk.green('<project-directory>')}`
162-
);
163-
}
146+
if (typeof projectName === 'undefined') {
147+
console.error('Please specify the project directory:');
148+
console.log(
149+
` ${chalk.cyan(program.name())} ${chalk.green('<project-directory>')}`
150+
);
164151
console.log();
165152
console.log('For example:');
166153
console.log(` ${chalk.cyan(program.name())} ${chalk.green('my-react-app')}`);

0 commit comments

Comments
 (0)