Skip to content
This repository was archived by the owner on Dec 18, 2017. It is now read-only.

Commit 828b008

Browse files
author
Praburaj
committed
dnvm install / upgrade should put the installed runtime on path even if the runtime is already installed
Fixes: #199
1 parent 82929ba commit 828b008

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/dnvm.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,8 +1038,6 @@ function dnvm-install {
10381038
_WriteDebug "Cleaning temporary directory $UnpackFolder"
10391039
Remove-Item $UnpackFolder -Force | Out-Null
10401040

1041-
dnvm-use $PackageVersion -Architecture:$Architecture -Runtime:$Runtime -Persistent:$Persistent
1042-
10431041
if ($Runtime -eq "clr") {
10441042
if (-not $NoNative) {
10451043
if ((Is-Elevated) -or $Ngen) {
@@ -1073,6 +1071,8 @@ function dnvm-install {
10731071
}
10741072
}
10751073

1074+
dnvm-use $PackageVersion -Architecture:$Architecture -Runtime:$Runtime -Persistent:$Persistent
1075+
10761076
if($Alias) {
10771077
_WriteDebug "Aliasing installed runtime to '$Alias'"
10781078
dnvm-alias $Alias $PackageVersion -Architecture:$Architecture -Runtime:$Runtime

test/ps1/tests/Install.Tests.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Describe "install" -Tag "install" {
7777
$runtimeName = GetRuntimeName -clr CLR -arch x86
7878

7979
It "uses x86" {
80-
$__dnvmtest_out.Trim() | Should Be "'$runtimeName' is already installed."
80+
$__dnvmtest_out.Trim() | Should Be "'$runtimeName' is already installed.`r`nAdding $UserPath\runtimes\$runtimeName\bin to process PATH"
8181
}
8282
}
8383

@@ -86,7 +86,7 @@ Describe "install" -Tag "install" {
8686
$runtimeName = GetRuntimeName -clr CLR -arch x86
8787

8888
It "uses Desktop CLR" {
89-
$__dnvmtest_out.Trim() | Should Be "'$runtimeName' is already installed."
89+
$__dnvmtest_out.Trim() | Should Be "'$runtimeName' is already installed.`r`nAdding $UserPath\runtimes\$runtimeName\bin to process PATH"
9090
}
9191
}
9292

@@ -95,7 +95,7 @@ Describe "install" -Tag "install" {
9595
$runtimeName = GetRuntimeName -clr CLR -arch x86
9696

9797
It "uses x86/Desktop" {
98-
$__dnvmtest_out.Trim() | Should Be "'$runtimeName' is already installed."
98+
$__dnvmtest_out.Trim() | Should Be "'$runtimeName' is already installed.`r`nAdding $UserPath\runtimes\$runtimeName\bin to process PATH"
9999
}
100100
}
101101

@@ -128,7 +128,7 @@ Describe "install" -Tag "install" {
128128
$runtimePath = "$UserPath\runtimes\$runtimeName"
129129
It "ensures the runtime is installed" {
130130
__dnvmtest_run install $TestRuntimeVersion -arch x86 -r "CLR" | Out-Null
131-
$__dnvmtest_out.Trim() | Should Be "'$runtimeName' is already installed."
131+
$__dnvmtest_out.Trim() | Should Be "'$runtimeName' is already installed.`r`nAdding $UserPath\runtimes\$runtimeName\bin to process PATH"
132132
$runtimePath | Should Exist
133133
}
134134
}

0 commit comments

Comments
 (0)