add path to the front of the variable instead of the back

This commit is contained in:
Krzysztof Wicher 2016-05-20 11:05:33 -07:00
parent b2c7140b2a
commit 5a77b03f36
2 changed files with 2 additions and 2 deletions

View file

@ -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"

View file

@ -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