Skip to content

Commit c0a0a84

Browse files
feat(create-app): improve non-empty message for current dir (#3117)
Co-authored-by: Shinigami <[email protected]>
1 parent 5fe9a69 commit c0a0a84

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/create-app/index.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,11 @@ async function init() {
155155
name: 'yes',
156156
initial: 'Y',
157157
message:
158-
`Target directory ${targetDir} is not empty.\n` +
159-
`Remove existing files and continue?`
158+
(targetDir === '.'
159+
? 'Current directory'
160+
: `Target directory ${targetDir}`) +
161+
' is not empty.\n' +
162+
'Remove existing files and continue?'
160163
})
161164
if (yes) {
162165
emptyDir(root)

0 commit comments

Comments
 (0)