Change DOTNET_ROOT for Linux

This commit is contained in:
IvanZosimov 2022-08-18 11:34:19 +02:00
parent 813933aedb
commit fd4ddcf785
2 changed files with 9 additions and 2 deletions

4
dist/index.js vendored
View File

@ -344,9 +344,11 @@ class DotnetCoreInstaller {
} }
else { else {
if (IS_WINDOWS) { if (IS_WINDOWS) {
// This is the default set in install-dotnet.ps1
core.exportVariable('DOTNET_ROOT', DotnetCoreInstaller.installationDirectoryWindows); core.exportVariable('DOTNET_ROOT', DotnetCoreInstaller.installationDirectoryWindows);
} }
else if (IS_LINUX) {
core.exportVariable('DOTNET_ROOT', DotnetCoreInstaller.installationDirectoryLinux);
}
else { else {
// This is the default set in install-dotnet.sh // This is the default set in install-dotnet.sh
core.addPath(path.join(process.env['HOME'] + '', '.dotnet')); core.addPath(path.join(process.env['HOME'] + '', '.dotnet'));

View File

@ -204,11 +204,16 @@ export class DotnetCoreInstaller {
core.exportVariable('DOTNET_ROOT', process.env['DOTNET_INSTALL_DIR']); core.exportVariable('DOTNET_ROOT', process.env['DOTNET_INSTALL_DIR']);
} else { } else {
if (IS_WINDOWS) { if (IS_WINDOWS) {
// This is the default set in install-dotnet.ps1
core.exportVariable( core.exportVariable(
'DOTNET_ROOT', 'DOTNET_ROOT',
DotnetCoreInstaller.installationDirectoryWindows DotnetCoreInstaller.installationDirectoryWindows
); );
}
else if (IS_LINUX) {
core.exportVariable(
'DOTNET_ROOT',
DotnetCoreInstaller.installationDirectoryLinux
);
} else { } else {
// This is the default set in install-dotnet.sh // This is the default set in install-dotnet.sh
core.addPath(path.join(process.env['HOME'] + '', '.dotnet')); core.addPath(path.join(process.env['HOME'] + '', '.dotnet'));