From 117ebc92ccd1e2fc4e1a882c24b2d59c43e146e1 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Thu, 8 Aug 2019 15:07:18 -0400 Subject: [PATCH] Add DOTNET_ROOT --- lib/installer.js | 1 + src/installer.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib/installer.js b/lib/installer.js index 5cf9a83..75891d6 100644 --- a/lib/installer.js +++ b/lib/installer.js @@ -163,6 +163,7 @@ 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; }); diff --git a/src/installer.ts b/src/installer.ts index 7016be9..7c975fd 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -171,6 +171,10 @@ export class DotnetCoreInstaller { this.version, 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; }