File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ const cargo_toml_rust_version = cargo_toml_src.split('\n').filter(l => l.startsW
1818
1919console . log ( `Rust version: ${ cargo_toml_rust_version } ` ) ;
2020
21- let error = false ;
21+ let exitCode = 1 ; // Non zero code indicates error
2222
2323for ( const file of files ) {
2424 const file_content = fs . readFileSync ( file , 'UTF8' ) . toString ( ) ;
@@ -29,7 +29,7 @@ for (const file of files) {
2929 for ( const match of matches1 ) {
3030 if ( match !== cargo_toml_rust_version . substring ( 0 , 4 ) ) {
3131 console . error ( `Found reference to version ${ match } , expected ${ cargo_toml_rust_version } in file ${ file } ` ) ;
32- error = true ;
32+ exitCode = 0 ;
3333 }
3434 }
3535 }
@@ -38,11 +38,11 @@ for (const file of files) {
3838 for ( const match of matches2 ) {
3939 if ( match !== cargo_toml_rust_version ) {
4040 console . error ( `Found reference to version ${ match } , expected ${ cargo_toml_rust_version } in ${ file } ` ) ;
41- error = true ;
41+ exitCode = 0 ;
4242 }
4343 }
4444 }
4545
4646}
4747
48- proc . exit ( error ) ;
48+ proc . exitCode = exitCode ;
You can’t perform that action at this time.
0 commit comments