diff --git a/build/KoreBuild.ps1 b/build/KoreBuild.ps1 index e7584cb..c7a8365 100644 --- a/build/KoreBuild.ps1 +++ b/build/KoreBuild.ps1 @@ -23,7 +23,11 @@ if ($env:KOREBUILD_DOTNET_VERSION) $dotnetVersion = $env:KOREBUILD_DOTNET_VERSION } -$dotnetLocalInstallFolder = "$env:LOCALAPPDATA\Microsoft\dotnet\" +$dotnetLocalInstallFolder = $env:DOTNET_INSTALL_DIR +if (!$dotnetLocalInstallFolder) +{ + $dotnetLocalInstallFolder = "$env:LOCALAPPDATA\Microsoft\dotnet\" +} $newPath = "$dotnetLocalInstallFolder;$env:PATH" if ($env:KOREBUILD_SKIP_RUNTIME_INSTALL -eq "1") { diff --git a/build/KoreBuild.sh b/build/KoreBuild.sh index 00c6d6b..7dbe85f 100755 --- a/build/KoreBuild.sh +++ b/build/KoreBuild.sh @@ -50,7 +50,8 @@ if [ ! -z "$KOREBUILD_SKIP_RUNTIME_INSTALL" ]; then else # Need to set this variable because by default the install script # requires sudo - export DOTNET_INSTALL_DIR=~/.dotnet + [ -z "$DOTNET_INSTALL_DIR" ] && DOTNET_INSTALL_DIR=~/.dotnet + export DOTNET_INSTALL_DIR=$DOTNET_INSTALL_DIR export KOREBUILD_FOLDER="$(dirname $koreBuildFolder)" chmod +x $koreBuildFolder/dotnet/dotnet-install.sh