diff --git a/packages/@aws-cdk-testing/cli-integ/lib/shell.ts b/packages/@aws-cdk-testing/cli-integ/lib/shell.ts index 0dacfe703..0464b5e21 100644 --- a/packages/@aws-cdk-testing/cli-integ/lib/shell.ts +++ b/packages/@aws-cdk-testing/cli-integ/lib/shell.ts @@ -133,6 +133,13 @@ export async function shell(command: string[], options: ShellOptions = {}): Prom if (code === 0 || options.allowErrExit) { resolve(out); + } else if (code === 127) { + logAndReject(new Error( + `'${command.join(' ')}' exited with error code 127. ` + + 'An executable invoked by this command ' + + 'was not found on PATH when it ran. This points to a missing or ' + + `unavailable executable, not to a failure within '${command[0]}' itself.`, + )); } else { logAndReject(new Error(`'${command.join(' ')}' exited with error code ${code}.`)); }