Skip to content

Commit

Permalink
fix(spawnd): remove exit dependency
Browse files Browse the repository at this point in the history
Closes #541
  • Loading branch information
gregberge committed Mar 9, 2023
1 parent 3c388a2 commit af2eb01
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/spawnd/package.json
Expand Up @@ -43,7 +43,6 @@
"devDependencies": {
"@types/exit": "^0.1.31",
"@types/signal-exit": "^3.0.1",
"exit": "^0.1.2",
"rollup": "^3.18.0",
"rollup-plugin-dts": "^5.2.0",
"rollup-plugin-swc3": "^0.8.0"
Expand Down
5 changes: 2 additions & 3 deletions packages/spawnd/src/index.ts
Expand Up @@ -5,7 +5,6 @@ import {
} from "node:child_process";
import { promisify } from "node:util";
import treeKill from "tree-kill";
import exit from "exit";
import onExit from "signal-exit";

const pTreeKill = promisify(treeKill);
Expand All @@ -21,9 +20,9 @@ export const spawnd = (command: string, options?: SpawndOptions) => {

const cleanExit = (code = 1) => {
if (proc && proc.pid) {
treeKill(proc.pid, () => exit(code));
treeKill(proc.pid, () => process.exit(code));
} else {
exit(code);
process.exit(code);
}
};

Expand Down

0 comments on commit af2eb01

Please sign in to comment.