Skip to content

Commit

Permalink
Differentiate conflicting directories from files
Browse files Browse the repository at this point in the history
  • Loading branch information
heyimalex committed Dec 13, 2019
1 parent 8fb4d66 commit b4c7b3f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/create-react-app/createReactApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,16 @@ function isSafeToCreateProjectIn(root, name) {
);
console.log();
for (const file of conflicts) {
console.log(` ${file}`);
try {
const stats = fs.lstatSync(path.join(root, file));
if (stats.isDirectory()) {
console.log(` ${chalk.blue(`${file}/`)}`);
} else {
console.log(` ${file}`);
}
} catch {
console.log(` ${file}`);
}
}
console.log();
console.log(
Expand Down

0 comments on commit b4c7b3f

Please sign in to comment.