diff --git a/.eslintrc.yaml b/.eslintrc.yaml new file mode 100644 index 0000000000..13d919e42c --- /dev/null +++ b/.eslintrc.yaml @@ -0,0 +1,3 @@ +--- +extends: ./eslint-config.yaml +root: true diff --git a/packages/jsii-pacmak/lib/util.ts b/packages/jsii-pacmak/lib/util.ts index 2d85818cb8..f97c115c38 100644 --- a/packages/jsii-pacmak/lib/util.ts +++ b/packages/jsii-pacmak/lib/util.ts @@ -73,9 +73,20 @@ export async function shell( const command = `${cmd} ${args.join(' ')}`; return ko( new Error( - `Command exited with ${reason}:\n- Command: ${command}\n- STDOUT:\n${out}\n- STDERR:\n${err}`, + [ + `Command (${command}) failed with ${reason}:`, + prefix(out, '#STDOUT> '), + prefix(err, '#STDERR> '), + ].join('\n'), ), ); + + function prefix(text: string, add: string): string { + return text + .split('\n') + .map((line) => `${add}${line}`) + .join('\n'); + } }); }); }