Correct path

This commit is contained in:
Danny McCormick 2019-08-08 15:16:55 -04:00
parent 117ebc92cc
commit 1516208c2e
2 changed files with 5 additions and 4 deletions

View File

@ -72,6 +72,8 @@ class DotnetCoreInstaller {
else {
console.log('Using cached tool');
}
// Need to set this so that .NET Core global tools find the right locations.
core.exportVariable('DOTNET_ROOT', toolPath);
// Prepend the tools path. instructs the agent to prepend for future tasks
core.addPath(toolPath);
});
@ -163,7 +165,6 @@ class DotnetCoreInstaller {
// cache tool
console.log('Caching tool');
let cachedDir = yield tc.cacheDir(extPath, this.cachedToolName, this.version, this.arch);
core.exportVariable('DOTNET_ROOT', cachedDir);
console.log('Successfully installed', this.version);
return cachedDir;
});

View File

@ -58,6 +58,9 @@ export class DotnetCoreInstaller {
console.log('Using cached tool');
}
// Need to set this so that .NET Core global tools find the right locations.
core.exportVariable('DOTNET_ROOT', toolPath);
// Prepend the tools path. instructs the agent to prepend for future tasks
core.addPath(toolPath);
}
@ -172,9 +175,6 @@ export class DotnetCoreInstaller {
this.arch
);
// Need to set this so that .NET Core global tools find the right locations.
core.exportVariable('DOTNET_ROOT', cachedDir);
console.log('Successfully installed', this.version);
return cachedDir;
}