Skip to content

Commit

Permalink
format name for existing file validation
Browse files Browse the repository at this point in the history
  • Loading branch information
cchang-vassar committed Aug 7, 2024
1 parent 40cab5b commit e95fd1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/cli/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async function runPrompts() {
return formatName(input);
},
validate: (input) => {
const fullDestPath = `${repoRoot}/packages/${type}-${input}`;
const fullDestPath = `${repoRoot}/packages/${type}-${formatName(input)}`;
if (fs.existsSync(fullDestPath)) {
return "A package with this name already exists. Please choose a different name.";
} else {
Expand Down

0 comments on commit e95fd1d

Please sign in to comment.