From ebd5397bb593d4f63a411fac633f2614f8652302 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Fri, 3 Nov 2023 15:44:34 -0700 Subject: [PATCH] sign-windows: If return code is non-zero, throw --- ts/scripts/sign-windows.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ts/scripts/sign-windows.ts b/ts/scripts/sign-windows.ts index 6dc1b4e48d07..f5bd93db74e6 100644 --- a/ts/scripts/sign-windows.ts +++ b/ts/scripts/sign-windows.ts @@ -25,7 +25,11 @@ export async function sign( const target = await realpath(configuration.path); // The script will update the file in-place - execSync(`bash ${scriptPath} ${target}`, { + const returnCode = execSync(`bash ${scriptPath} ${target}`, { stdio: [null, process.stdout, process.stderr], }); + + if (returnCode) { + throw new Error(`sign-windows: Script returned code ${returnCode}`); + } }