diff --git a/src/node/shortcuts.ts b/src/node/shortcuts.ts index 84aa03ec..ff0c64df 100644 --- a/src/node/shortcuts.ts +++ b/src/node/shortcuts.ts @@ -33,8 +33,10 @@ export function bindShortcuts( const onInput = async (input: string) => { // ctrl+c or ctrl+d if (input === '\x03' || input === '\x04') { - await server.close().finally(() => process.exit(1)) - return + await server + .close() + .catch(() => (process.exitCode = 1)) + .finally(() => process.exit()) } if (actionRunning) return