Skip to content

Commit

Permalink
fix(cli): ctrl+C no longer kills processes (vitejs#11434) (vitejs#11518)
Browse files Browse the repository at this point in the history
Co-authored-by: Arnaud Barré <arnaud.barre72@gmail.com>
close vitejs#11434
  • Loading branch information
kinfuy authored and futurGH committed Feb 26, 2023
1 parent 6843445 commit 67e2bb3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vite/src/node/shortcuts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export function bindShortcuts(
const onInput = async (input: string) => {
// ctrl+c or ctrl+d
if (input === '\x03' || input === '\x04') {
process.emit('SIGTERM')
process.stdin.setRawMode(false)
process.stdin.write(input)
return
}

Expand Down

0 comments on commit 67e2bb3

Please sign in to comment.