Skip to content

Commit

Permalink
fix(cli): ctrl+C no longer kills processes (#11434) (#11518)
Browse files Browse the repository at this point in the history
Co-authored-by: Arnaud Barré <[email protected]>
close #11434
  • Loading branch information
kinfuy authored Jan 2, 2023
1 parent 3647d07 commit 718fc1d
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 718fc1d

Please sign in to comment.