Skip to content

Commit

Permalink
Run 'npm run build'
Browse files Browse the repository at this point in the history
  • Loading branch information
mannie-exe committed May 16, 2022
1 parent c90afab commit 0aecd56
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62682,8 +62682,16 @@ function translateArchToDistUrl(arch) {
}
function parseNodeVersionFile(contents) {
let nodeVersion = contents.trim();
if (/^v\d/.test(nodeVersion)) {
nodeVersion = nodeVersion.substring(1);
try {
// assume all content parseable as JSON is a valid,
// npm package.json file
nodeVersion = JSON.parse(nodeVersion).engines.node;
}
catch (err) {
// if not, assume it is a node version file
if (/^v\d/.test(nodeVersion)) {
nodeVersion = nodeVersion.substring(1);
}
}
return nodeVersion;
}
Expand Down

0 comments on commit 0aecd56

Please sign in to comment.