Skip to content

Commit

Permalink
fix: fail with exit code != 0 when tests fail
Browse files Browse the repository at this point in the history
  • Loading branch information
ZauberNerd committed Feb 11, 2019
1 parent b2249c1 commit 74e6ea2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,14 @@ config.repositories.forEach(({ directory, commands }) => {
commands.forEach((input) => {
const [command, ...args] = input.split(' ');
if (typeof command === 'string' && command !== '') {
child_process.spawnSync(command, args, {
const { status } = child_process.spawnSync(command, args, {
cwd: path.join(config.target, directory),
stdio: 'inherit',
});

if (status !== 0) {
process.exitCode = status;
}
}
});
});

0 comments on commit 74e6ea2

Please sign in to comment.