From 7de6b26c3885c5c8b88f8e32e48a1e928bcb3b83 Mon Sep 17 00:00:00 2001 From: IvanZosimov Date: Thu, 18 Aug 2022 10:43:34 +0200 Subject: [PATCH] Change DOTNET_ROOT for windows --- dist/index.js | 3 +-- src/installer.ts | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/dist/index.js b/dist/index.js index d99a41c..8c119b2 100644 --- a/dist/index.js +++ b/dist/index.js @@ -347,8 +347,7 @@ class DotnetCoreInstaller { else { if (IS_WINDOWS) { // This is the default set in install-dotnet.ps1 - core.addPath(path.join(process.env['LocalAppData'] + '', 'Microsoft', 'dotnet')); - core.exportVariable('DOTNET_ROOT', path.join(process.env['LocalAppData'] + '', 'Microsoft', 'dotnet')); + core.exportVariable('DOTNET_ROOT', "C:\Program Files\dotnet"); } else { // This is the default set in install-dotnet.sh diff --git a/src/installer.ts b/src/installer.ts index 0c4c4f1..9de53f9 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -204,12 +204,9 @@ export class DotnetCoreInstaller { } else { if (IS_WINDOWS) { // This is the default set in install-dotnet.ps1 - core.addPath( - path.join(process.env['LocalAppData'] + '', 'Microsoft', 'dotnet') - ); core.exportVariable( 'DOTNET_ROOT', - path.join(process.env['LocalAppData'] + '', 'Microsoft', 'dotnet') + "C:\Program Files\dotnet" ); } else { // This is the default set in install-dotnet.sh