Skip to content

Commit

Permalink
chore(lambda-nodejs): improve spawnSync error message
Browse files Browse the repository at this point in the history
  • Loading branch information
blimmer committed Oct 15, 2021
1 parent 55fbc86 commit 58856fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda-nodejs/lib/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function exec(cmd: string, args: string[], options?: SpawnSyncOptions) {
if (proc.stdout || proc.stderr) {
throw new Error(`[Status ${proc.status}] stdout: ${proc.stdout?.toString().trim()}\n\n\nstderr: ${proc.stderr?.toString().trim()}`);
}
throw new Error(`${cmd} exited with status ${proc.status}`);
throw new Error(`${cmd} ${args.join(' ')} ${options?.cwd ? `run in directory ${options.cwd}` : ''} exited with status ${proc.status}`);
}

return proc;
Expand Down

0 comments on commit 58856fa

Please sign in to comment.