Skip to content

Commit fb77411

Browse files
authored
fix(cli): exit 1 on ctrl+c (#11563)
1 parent 9c4ca07 commit fb77411

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vite/src/node/shortcuts.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function bindShortcuts(
4444
const onInput = async (input: string) => {
4545
// ctrl+c or ctrl+d
4646
if (input === '\x03' || input === '\x04') {
47-
process.emit('SIGTERM')
47+
await server.close().finally(() => process.exit(1))
4848
return
4949
}
5050

0 commit comments

Comments
 (0)