diff --git a/cli/run/watch-cli.ts b/cli/run/watch-cli.ts index 987c2f21bdf..db89e003d0f 100644 --- a/cli/run/watch-cli.ts +++ b/cli/run/watch-cli.ts @@ -153,8 +153,7 @@ export async function watch(command: Record): Promise { if (watcher) await watcher.close(); if (configWatcher) configWatcher.close(); - - process.exit(code || 0); + if (code) process.exit(code); } // return a promise that never resolves to keep the process running