diff --git a/src/index.ts b/src/index.ts index f3f77608..4ddac01f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -29,9 +29,9 @@ const REQUIRED_NODE_VERSION = "10.14.2"; const requiredParts = REQUIRED_NODE_VERSION.split(".").map(v => parseInt(v, 10)); const actualVersionParts = process.versions.node.split(".").map(v => parseInt(v, 10)); for (const [i, part] of actualVersionParts.entries()) { - if (part < requiredParts[i]) { - throw new SimpleError(`Unsupported Node.js version! Must be at least ${REQUIRED_NODE_VERSION}`); - } + if (part > requiredParts[i]) break; + if (part === requiredParts[i]) continue; + throw new SimpleError(`Unsupported Node.js version! Must be at least ${REQUIRED_NODE_VERSION}`); } // Always use UTC