From cf593ed679c7304b5e43c0dca7a08167f32ef70b Mon Sep 17 00:00:00 2001 From: Christopher Monsanto Date: Wed, 30 Sep 2020 20:49:14 -0400 Subject: [PATCH] sheet: propagate exit code on 'exit' event instead of 'close' --- tools/sheet/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/sheet/index.ts b/tools/sheet/index.ts index 428d9104..7ca3caf6 100644 --- a/tools/sheet/index.ts +++ b/tools/sheet/index.ts @@ -44,6 +44,8 @@ for (const entry of sheet.entries) { } proc.stdin.end(); -proc.on('close', (code) => { - process.exit(code); +proc.on('exit', (code, signal) => { + if (code || signal) { + process.exitCode = 1; + } });