Merge pull request #3163 from krwq/fix_2361

add path to the front of the variable instead of the back
This commit is contained in:
Livar 2016-05-24 10:30:55 -07:00
commit 7ab4c0bd2b
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) $BinPath = Get-Absolute-Path $(Join-Path -Path $InstallRoot -ChildPath $BinFolderRelativePath)
if (-Not $NoPath) { 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." 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 { else {
Say "Binaries of dotnet can be found in $BinPath" 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)) bin_path=$(get_absolute_path $(combine_paths $install_root $bin_folder_relative_path))
if [ "$no_path" = false ]; then if [ "$no_path" = false ]; then
say "Adding to current process PATH: ``$bin_path``. Note: This change will be visible only when sourcing script." 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 else
say "Binaries of dotnet can be found in $bin_path" say "Binaries of dotnet can be found in $bin_path"
fi fi