Skip to content

Commit

Permalink
fix: Ctrl+C no longer kills processes (vitejs#11434)
Browse files Browse the repository at this point in the history
  • Loading branch information
kinfuy committed Dec 29, 2022
1 parent 2c38bae commit 0ce958c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/vite/src/node/shortcuts.ts
Expand Up @@ -44,8 +44,8 @@ export function bindShortcuts(
const onInput = async (input: string) => {
// ctrl+c or ctrl+d
if (input === '\x03' || input === '\x04') {
process.emit('SIGTERM')
return
// process.emit('SIGTERM')
process.exit(1)
}

if (actionRunning) return
Expand Down Expand Up @@ -112,6 +112,13 @@ const BASE_SHORTCUTS: CLIShortcut[] = [
openBrowser(url, true, server.config.logger)
},
},
{
key: 'c',
description: 'clear console',
async action(server) {
server.config.logger.clearScreen('error')
},
},
{
key: 'q',
description: 'quit',
Expand Down

0 comments on commit 0ce958c

Please sign in to comment.