Skip to content

Commit 094edc0

Browse files
committed
Invert logic
1 parent 5924158 commit 094edc0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/verify-rust-version.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const cargo_toml_rust_version = cargo_toml_src.split('\n').filter(l => l.startsW
1818

1919
console.log(`Rust version: ${cargo_toml_rust_version}`);
2020

21-
let exitCode = 1; // Non zero code indicates error
21+
let exitCode = 0; // Non zero code indicates error
2222

2323
for (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-
exitCode = 0;
32+
exitCode = 1;
3333
}
3434
}
3535
}
@@ -38,7 +38,7 @@ 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-
exitCode = 0;
41+
exitCode = 1;
4242
}
4343
}
4444
}

0 commit comments

Comments
 (0)