Skip to content

Commit 8b96d7f

Browse files
committed
fix(svite): avoid duplicate help output of cli
1 parent 8fbda92 commit 8b96d7f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/svite/src/cli/svite.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ async function main() {
3737
if (cli.matchedCommand) {
3838
await cli.runMatchedCommand()
3939
} else {
40-
cli.outputHelp()
40+
const args = process.argv.slice(2)
41+
if (!args.find((arg) => ['-h', '--help'].includes(arg))) {
42+
cli.outputHelp()
43+
}
4144
}
4245
}
4346
main().catch((e) => {

0 commit comments

Comments
 (0)