From f50fe00b2687fb20bc6188b120b2f4ee036c3370 Mon Sep 17 00:00:00 2001 From: Joseph Petersen Date: Sat, 21 Dec 2019 07:30:05 +0100 Subject: [PATCH] add .dotnet/tools to path --- lib/installer.js | 4 ++++ src/installer.ts | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/lib/installer.js b/lib/installer.js index 527eafd..d7b4a74 100644 --- a/lib/installer.js +++ b/lib/installer.js @@ -75,6 +75,10 @@ class DotnetCoreInstaller { core.exportVariable('DOTNET_ROOT', toolPath); // Prepend the tools path. instructs the agent to prepend for future tasks core.addPath(toolPath); + // Prepend the dotnet global tools path + const homedir = os.homedir(); + const dotnetToolsPath = path.join(homedir, '.dotnet/tools'); + core.addPath(dotnetToolsPath); }); } getLocalTool() { diff --git a/src/installer.ts b/src/installer.ts index f975a22..f38c6b6 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -62,6 +62,11 @@ export class DotnetCoreInstaller { // Prepend the tools path. instructs the agent to prepend for future tasks core.addPath(toolPath); + + // Prepend the dotnet global tools path + const homedir = os.homedir(); + const dotnetToolsPath = path.join(homedir, '.dotnet/tools'); + core.addPath(dotnetToolsPath); } private getLocalTool(): string {