From 5a77b03f36904670faa36c0d294237ec8841e8f1 Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher Date: Fri, 20 May 2016 11:05:33 -0700 Subject: [PATCH] add path to the front of the variable instead of the back --- scripts/obtain/dotnet-install.ps1 | 2 +- scripts/obtain/dotnet-install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/obtain/dotnet-install.ps1 b/scripts/obtain/dotnet-install.ps1 index 5c4d86091..4f36a995f 100644 --- a/scripts/obtain/dotnet-install.ps1 +++ b/scripts/obtain/dotnet-install.ps1 @@ -336,7 +336,7 @@ foreach ($DownloadLink in $DownloadLinks) { $BinPath = Get-Absolute-Path $(Join-Path -Path $InstallRoot -ChildPath $BinFolderRelativePath) if (-Not $NoPath) { Say "Adding to current process PATH: `"$BinPath`". Note: This change will not be visible if PowerShell was run as a child process." - $env:path += ";$BinPath" + $env:path = "$BinPath;" + $env:path } else { Say "Binaries of dotnet can be found in $BinPath" diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh index 614bced13..7c325a4a7 100755 --- a/scripts/obtain/dotnet-install.sh +++ b/scripts/obtain/dotnet-install.sh @@ -631,7 +631,7 @@ install_dotnet bin_path=$(get_absolute_path $(combine_paths $install_root $bin_folder_relative_path)) if [ "$no_path" = false ]; then say "Adding to current process PATH: ``$bin_path``. Note: This change will be visible only when sourcing script." - export PATH=$PATH:$bin_path + export PATH=$bin_path:$PATH else say "Binaries of dotnet can be found in $bin_path" fi