Skip to content

Commit d461ea1

Browse files
committed
ci: fixed node version check
Signed-off-by: prisis <[email protected]>
1 parent 3da684d commit d461ea1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

verify-node-version.cjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ let requiredVersion = require("node:fs").readFileSync(".nvmrc", { encoding: "utf
33
if (!requiredVersion.includes("v")) {
44
requiredVersion = `v${requiredVersion}`;
55
}
6-
7-
if (process.env.SKIP_CHECK !== undefined) {
6+
// eslint-disable-next-line dot-notation
7+
if (process.env["SKIP_CHECK"] !== undefined) {
88
// eslint-disable-next-line unicorn/no-process-exit
99
process.exit(0);
1010
}
1111

12-
if (process.version.split(".")[0] !== requiredVersion.split(".")[0]) {
12+
if (!(requiredVersion.split(".")[0] <= process.version.split(".")[0])) {
1313
console.error(`[!] This project requires Node.js ${requiredVersion}, current version is ${process.version}`);
1414

1515
// eslint-disable-next-line unicorn/no-process-exit

0 commit comments

Comments
 (0)