Skip to content
Snippets Groups Projects
Unverified Commit 7cbd852f authored by tamaina's avatar tamaina Committed by GitHub
Browse files

pnpm devでCtrl+Cで終了させてもプロセスが完全に殺せないのを修正 (#10914)

parent a80003cd
No related branches found
No related tags found
No related merge requests found
......@@ -44,11 +44,17 @@ const fs = require('fs');
if (!stat) throw new Error('not exist yet');
if (stat.size === 0) throw new Error('not built yet');
await execa('pnpm', ['start'], {
const subprocess = await execa('pnpm', ['start'], {
cwd: __dirname + '/../',
stdout: process.stdout,
stderr: process.stderr,
});
// なぜかworkerだけが終了してmasterが残るのでその対策
process.on('SIGINT', () => {
subprocess.kill('SIGINT');
process.exit(0);
});
} catch (e) {
await new Promise(resolve => setTimeout(resolve, 3000));
start();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment