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

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;
}