Skip to content

Commit

Permalink
dev: fix pnpm dev is broken (#14123)
Browse files Browse the repository at this point in the history
* dev: pnpm dev is broken

* dev: fix crash pnpm dev because of unhandled promise
  • Loading branch information
anatawa12 authored Jul 2, 2024
1 parent de1fe7c commit 5d03efa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 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 All @@ -46,6 +47,7 @@ async function killProc() {
],
{
stdio: [process.stdin, process.stdout, process.stderr, 'ipc'],
serialization: "json",
})
.on('message', async (message) => {
if (message.type === 'exit') {
Expand Down

0 comments on commit 5d03efa

Please sign in to comment.