Skip to content

Commit 92f46af

Browse files
JCMaisDEADF00D
authored andcommitted
fix: cpp std script incorrectly logging multiple c++ versions
1 parent 8acb807 commit 92f46af

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

scripts/cpp-std.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,20 @@ if (process.env.NODE_LIBCURL_CPP_STD) {
3232
} else {
3333
console.log('c++98')
3434
}
35-
}
36-
37-
// https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json
38-
// https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json
39-
// 129 === Node.js v23
40-
if (process.versions.modules && parseInt(process.versions.modules) >= 129) {
41-
console.log('c++20')
42-
} else if (
43-
process.versions.modules &&
44-
parseInt(process.versions.modules) >= 88
45-
) {
46-
// 88 === Node.js v15
47-
console.log('c++17')
4835
} else {
49-
console.log('c++98')
36+
// https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json
37+
// https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json
38+
// 129 === Node.js v23
39+
if (process.versions.modules && parseInt(process.versions.modules) >= 129) {
40+
console.log('c++20')
41+
} else if (
42+
process.versions.modules &&
43+
parseInt(process.versions.modules) >= 88
44+
) {
45+
// 88 === Node.js v15
46+
console.log('c++17')
47+
} else {
48+
console.log('c++98')
49+
}
5050
}
5151
}

0 commit comments

Comments
 (0)