Skip to content

Commit 44134be

Browse files
committed
better error reporting for cmd errors in test
1 parent 5599651 commit 44134be

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@ const mkCommand = cmd => (args, options = {}) => {
2323
)
2424
);
2525
if (error) throw error;
26-
if (status)
26+
if (status) {
27+
console.error(stdout.toString()):
28+
console.error(stderr.toString()):
2729
throw new Error(
28-
`${cmd} failed with status code ${status} and stderr: ${stderr}`
30+
`${cmd} failed with status code ${status}`
2931
);
32+
}
3033
return stdout && stdout.toString().trim();
3134
};
3235
const sls = mkCommand('sls');

0 commit comments

Comments
 (0)