Skip to content

Commit

Permalink
feat(create-app): improve non-empty message for current dir (vitejs#3117
Browse files Browse the repository at this point in the history
)

Co-authored-by: Shinigami <chrissi92@hotmail.de>
  • Loading branch information
2 people authored and TobiasMelen committed May 3, 2021
1 parent 61fbc8c commit f30e790
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/create-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,11 @@ async function init() {
name: 'yes',
initial: 'Y',
message:
`Target directory ${targetDir} is not empty.\n` +
`Remove existing files and continue?`
(targetDir === '.'
? 'Current directory'
: `Target directory ${targetDir}`) +
' is not empty.\n' +
'Remove existing files and continue?'
})
if (yes) {
emptyDir(root)
Expand Down

0 comments on commit f30e790

Please sign in to comment.