Skip to content

Commit 3da220c

Browse files
authored
fix(dev): handle completions when running npm create nuxt (#1149)
1 parent 0aa3a0f commit 3da220c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/create-nuxt/src/main.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { CommandDef } from 'citty'
2+
import process from 'node:process'
23
import { defineCommand } from 'citty'
34
import { provider } from 'std-env'
45

@@ -30,7 +31,9 @@ const _main = defineCommand({
3031
},
3132
})
3233

33-
// eslint-disable-next-line antfu/no-top-level-await
34-
await setupInitCompletions(_main)
34+
if (process.argv[2] === 'complete') {
35+
// eslint-disable-next-line antfu/no-top-level-await
36+
await setupInitCompletions(_main)
37+
}
3538

3639
export const main = _main as CommandDef<any>

0 commit comments

Comments
 (0)