Skip to content

Commit

Permalink
delint
Browse files Browse the repository at this point in the history
  • Loading branch information
mceachen committed Oct 20, 2024
1 parent e2e9cc0 commit 85ec9e1
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/mkver.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,15 @@ function _exec(cp: ChildProcess): Promise<string> {
// console.error("cp.on(error)", ea)
rej(ea);
});
cp.on("close", (code) => {
// console.error("cp.on(close)", { code })
code == 0 ? res(buf.join("")) : rej("bad exit code " + code);
});
cp.on("exit", (code) => {
// console.error("cp.on(exit)", { code })
code == 0 ? res(buf.join("")) : rej("bad exit code " + code);
});
const callback = (code: number | null) => {
if (code == 0) {
res(buf.join(""));
} else {
rej("bad exit code " + code);
}
};
cp.on("close", callback);
cp.on("exit", callback);
});
}

Expand Down

0 comments on commit 85ec9e1

Please sign in to comment.