Skip to content

Commit

Permalink
dev: fix crash pnpm dev because of unhandled promise
Browse files Browse the repository at this point in the history
  • Loading branch information
anatawa12 committed Jul 2, 2024
1 parent 2cdde13 commit 0255e28
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/backend/scripts/dev.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ function execStart() {

async function killProc() {
if (backendProcess) {
backendProcess.catch(() => {}); // backendProcess.kill()によって発生する例外を無視するためにcatch()を呼び出す
backendProcess.kill();
await new Promise(resolve => backendProcess.on('exit', resolve));
backendProcess = undefined;
Expand Down

0 comments on commit 0255e28

Please sign in to comment.