Skip to content

Commit

Permalink
Update init.js
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-siek authored Oct 12, 2023
1 parent dc7b566 commit e095ddd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build/npm/v2-jf/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ function isValidNpmVersion() {
const child_process = require("child_process");
const npmVersionCmdOut = child_process.execSync("npm version -json");
const npmVersion = JSON.parse(npmVersionCmdOut).npm;
// Supported since version 5.0.0
return parseInt(npmVersion.charAt(0)) > 4;
// Supported since version 5.0.0 (also support npm v10+)
return parseInt(npmVersion.split('.')[0]) > 4;
}

function writeToFile(response) {
Expand Down Expand Up @@ -153,4 +153,4 @@ function getFileName() {
executable += ".exe";
}
return executable;
}
}

0 comments on commit e095ddd

Please sign in to comment.