Skip to content

Commit

Permalink
inherit exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
pokey committed Nov 10, 2023
1 parent 9ce24ad commit e342216
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/common/scripts/my-ts-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ function main() {
esbuildProcess.on("close", (code) => {
if (code === 0) {
// Execute the bundled file with Node, passing any additional arguments
runCommand(process.execPath, [outFile, ...childArgs]);
const nodeProcess = runCommand(process.execPath, [outFile, ...childArgs]);
nodeProcess.on("close", (code) => process.exit(code ?? undefined));
} else {
console.error(`esbuild failed with code ${code}`);
process.exit(code ?? undefined);
Expand Down

0 comments on commit e342216

Please sign in to comment.