Skip to content

Commit c2d52a8

Browse files
committed
fix: targetDir should be inferred from positionals instead of args
Fixes #464
1 parent 92ff300 commit c2d52a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ async function init() {
100100
devtools: { type: 'boolean' }
101101
} as const
102102

103-
const { values: argv } = parseArgs({
103+
const { values: argv, positionals } = parseArgs({
104104
args,
105105
options,
106106
strict: false
@@ -123,7 +123,7 @@ async function init() {
123123
(argv.devtools || argv['vue-devtools'])
124124
) === 'boolean'
125125

126-
let targetDir = args[0]
126+
let targetDir = positionals[0]
127127
const defaultProjectName = !targetDir ? 'vue-project' : targetDir
128128

129129
const forceOverwrite = argv.force

0 commit comments

Comments
 (0)