Skip to content

Commit 74e6ea2

Browse files
committed
fix: fail with exit code != 0 when tests fail
1 parent b2249c1 commit 74e6ea2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,14 @@ config.repositories.forEach(({ directory, commands }) => {
136136
commands.forEach((input) => {
137137
const [command, ...args] = input.split(' ');
138138
if (typeof command === 'string' && command !== '') {
139-
child_process.spawnSync(command, args, {
139+
const { status } = child_process.spawnSync(command, args, {
140140
cwd: path.join(config.target, directory),
141141
stdio: 'inherit',
142142
});
143+
144+
if (status !== 0) {
145+
process.exitCode = status;
146+
}
143147
}
144148
});
145149
});

0 commit comments

Comments
 (0)