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

View file

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

View file

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