From fd4ddcf7850c69d3110201a2882aba83faf07a79 Mon Sep 17 00:00:00 2001 From: IvanZosimov Date: Thu, 18 Aug 2022 11:34:19 +0200 Subject: [PATCH] Change DOTNET_ROOT for Linux --- dist/index.js | 4 +++- src/installer.ts | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 8942fb9..fc50f58 100644 --- a/dist/index.js +++ b/dist/index.js @@ -344,9 +344,11 @@ class DotnetCoreInstaller { } else { if (IS_WINDOWS) { - // This is the default set in install-dotnet.ps1 core.exportVariable('DOTNET_ROOT', DotnetCoreInstaller.installationDirectoryWindows); } + else if (IS_LINUX) { + core.exportVariable('DOTNET_ROOT', DotnetCoreInstaller.installationDirectoryLinux); + } else { // This is the default set in install-dotnet.sh core.addPath(path.join(process.env['HOME'] + '', '.dotnet')); diff --git a/src/installer.ts b/src/installer.ts index 5f5c5b3..6846ead 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -204,11 +204,16 @@ export class DotnetCoreInstaller { core.exportVariable('DOTNET_ROOT', process.env['DOTNET_INSTALL_DIR']); } else { if (IS_WINDOWS) { - // This is the default set in install-dotnet.ps1 core.exportVariable( 'DOTNET_ROOT', DotnetCoreInstaller.installationDirectoryWindows ); + } + else if (IS_LINUX) { + core.exportVariable( + 'DOTNET_ROOT', + DotnetCoreInstaller.installationDirectoryLinux + ); } else { // This is the default set in install-dotnet.sh core.addPath(path.join(process.env['HOME'] + '', '.dotnet'));