File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ const emptySha = '0'.repeat(40);
16
16
17
17
18
18
export default function ( _ : { } , logger : logging . Logger ) {
19
+ let validateCommitResult = 0 ;
20
+
19
21
// Work on POSIX and Windows
20
22
const rl = readline . createInterface ( {
21
23
input : process . stdin ,
@@ -33,10 +35,10 @@ export default function (_: {}, logger: logging.Logger) {
33
35
34
36
if ( remoteSha == emptySha ) {
35
37
// New branch.
36
- validateCommits ( { base : localSha } , logger ) ;
38
+ validateCommitResult = validateCommits ( { base : localSha } , logger ) ;
37
39
} else {
38
- validateCommits ( { base : remoteSha , head : localSha } , logger ) ;
40
+ validateCommitResult = validateCommits ( { base : remoteSha , head : localSha } , logger ) ;
39
41
}
40
42
} ) ;
41
- rl . on ( 'end' , ( ) => process . exit ( 0 ) ) ;
43
+ rl . on ( 'end' , ( ) => process . exit ( validateCommitResult ) ) ;
42
44
}
You can’t perform that action at this time.
0 commit comments