chore: trim no matter what

This commit is contained in:
Jef LeCompte
2022-06-30 09:22:35 -07:00
parent d86a20eb78
commit 1c48dc5a9e
2 changed files with 3 additions and 7 deletions

5
dist/setup/index.js vendored
View File

@@ -71768,13 +71768,10 @@ function translateArchToDistUrl(arch) {
}
}
function parseNodeVersionFile(contents) {
let nodeVersion;
let nodeVersion = contents.trim();
if (contents.includes('volta')) {
nodeVersion = JSON.parse(contents).volta.node;
}
else {
nodeVersion = contents.trim();
}
if (/^v\d/.test(nodeVersion)) {
nodeVersion = nodeVersion.substring(1);
}