mirror of
https://github.com/actions/setup-node.git
synced 2025-07-21 23:46:08 +08:00
chore: trim no matter what
This commit is contained in:
5
dist/setup/index.js
vendored
5
dist/setup/index.js
vendored
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user