diff --git a/src/execShell.ts b/src/execShell.ts index 2f7e2d5..3ae8d27 100644 --- a/src/execShell.ts +++ b/src/execShell.ts @@ -19,6 +19,9 @@ export function execShellSync( if (result.error) { throw result.error; } + if (result.status !== 0) { + throw new Error(`${file} failed with exit code ${result.status}.`); + } return result.stdout; } else { return execFileSync(file, args, options);