Skip to content

Commit 3d80aa8

Browse files
committed
ci: fix pre-push hook
1 parent 744cfa4 commit 3d80aa8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/hooks/pre-push.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ const emptySha = '0'.repeat(40);
1616

1717

1818
export default function (_: {}, logger: logging.Logger) {
19+
let validateCommitResult = 0;
20+
1921
// Work on POSIX and Windows
2022
const rl = readline.createInterface({
2123
input: process.stdin,
@@ -33,10 +35,10 @@ export default function (_: {}, logger: logging.Logger) {
3335

3436
if (remoteSha == emptySha) {
3537
// New branch.
36-
validateCommits({ base: localSha }, logger);
38+
validateCommitResult = validateCommits({ base: localSha }, logger);
3739
} else {
38-
validateCommits({ base: remoteSha, head: localSha }, logger);
40+
validateCommitResult = validateCommits({ base: remoteSha, head: localSha }, logger);
3941
}
4042
});
41-
rl.on('end', () => process.exit(0));
43+
rl.on('end', () => process.exit(validateCommitResult));
4244
}

0 commit comments

Comments
 (0)