minor fix

This commit is contained in:
Dmitry Shibanov 2022-12-13 16:33:20 +01:00
parent 05e1c35e88
commit 15798eaae7
3 changed files with 16 additions and 4 deletions

10
dist/setup/index.js vendored
View file

@ -73483,6 +73483,7 @@ class NightlyNodejs extends base_distribution_1.default {
super(nodeInfo);
}
findVersionInHoostedToolCacheDirectory() {
let toolPath = '';
const localVersionPaths = tc
.findAllVersions('node', this.nodeInfo.arch)
.filter(i => {
@ -73493,7 +73494,9 @@ class NightlyNodejs extends base_distribution_1.default {
return prerelease[0].includes('nightly');
});
const localVersion = this.evaluateVersions(localVersionPaths);
const toolPath = tc.find('node', localVersion, this.nodeInfo.arch);
if (localVersion) {
toolPath = tc.find('node', localVersion, this.nodeInfo.arch);
}
return toolPath;
}
evaluateVersions(versions) {
@ -73833,6 +73836,7 @@ class CanaryBuild extends base_distribution_1.default {
super(nodeInfo);
}
findVersionInHoostedToolCacheDirectory() {
let toolPath = '';
const localVersionPaths = tc
.findAllVersions('node', this.nodeInfo.arch)
.filter(i => {
@ -73843,7 +73847,9 @@ class CanaryBuild extends base_distribution_1.default {
return prerelease[0].includes('v8-canary');
});
const localVersion = this.evaluateVersions(localVersionPaths);
const toolPath = tc.find('node', localVersion, this.nodeInfo.arch);
if (localVersion) {
toolPath = tc.find('node', localVersion, this.nodeInfo.arch);
}
return toolPath;
}
getDistributionUrl() {

View file

@ -12,6 +12,7 @@ export default class NightlyNodejs extends BaseDistribution {
}
protected findVersionInHoostedToolCacheDirectory(): string {
let toolPath = '';
const localVersionPaths = tc
.findAllVersions('node', this.nodeInfo.arch)
.filter(i => {
@ -23,7 +24,9 @@ export default class NightlyNodejs extends BaseDistribution {
return prerelease[0].includes('nightly');
});
const localVersion = this.evaluateVersions(localVersionPaths);
const toolPath = tc.find('node', localVersion, this.nodeInfo.arch);
if (localVersion) {
toolPath = tc.find('node', localVersion, this.nodeInfo.arch);
}
return toolPath;
}

View file

@ -12,6 +12,7 @@ export default class CanaryBuild extends BaseDistribution {
}
protected findVersionInHoostedToolCacheDirectory(): string {
let toolPath = '';
const localVersionPaths = tc
.findAllVersions('node', this.nodeInfo.arch)
.filter(i => {
@ -24,7 +25,9 @@ export default class CanaryBuild extends BaseDistribution {
});
const localVersion = this.evaluateVersions(localVersionPaths);
const toolPath = tc.find('node', localVersion, this.nodeInfo.arch);
if (localVersion) {
toolPath = tc.find('node', localVersion, this.nodeInfo.arch);
}
return toolPath;
}