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

Commit f5f8e1a

Browse files
committed
Change upgrade to persist downloaded runtime to user profile again.
1 parent 2a7c45b commit f5f8e1a

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/dnvm.ps1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ function dnvm-upgrade {
896896
[Parameter(Mandatory=$false)]
897897
[switch]$Ngen)
898898

899-
dnvm-install "latest" -Alias:$Alias -Architecture:$Architecture -Runtime:$Runtime -Force:$Force -Proxy:$Proxy -NoNative:$NoNative -Ngen:$Ngen
899+
dnvm-install "latest" -Alias:$Alias -Architecture:$Architecture -Runtime:$Runtime -Force:$Force -Proxy:$Proxy -NoNative:$NoNative -Ngen:$Ngen -Persistent:$true
900900
}
901901

902902
<#
@@ -920,6 +920,8 @@ function dnvm-upgrade {
920920
Skip generation of native images
921921
.PARAMETER Ngen
922922
For CLR flavor only. Generate native images for runtime libraries on Desktop CLR to improve startup time. This option requires elevated privilege and will be automatically turned on if the script is running in administrative mode. To opt-out in administrative mode, use -NoNative switch.
923+
.PARAMETER Persistent
924+
Make the installed runtime useable across all processes run by the current user
923925
.DESCRIPTION
924926
A proxy can also be specified by using the 'http_proxy' environment variable
925927
@@ -954,7 +956,10 @@ function dnvm-install {
954956
[switch]$NoNative,
955957

956958
[Parameter(Mandatory=$false)]
957-
[switch]$Ngen)
959+
[switch]$Ngen,
960+
961+
[Parameter(Mandatory=$false)]
962+
[switch]$Persistent)
958963

959964
if(!$VersionNuPkgOrAlias) {
960965
_WriteOut "A version, nupkg path, or the string 'latest' must be provided."
@@ -1033,7 +1038,7 @@ function dnvm-install {
10331038
_WriteDebug "Cleaning temporary directory $UnpackFolder"
10341039
Remove-Item $UnpackFolder -Force | Out-Null
10351040

1036-
dnvm-use $PackageVersion -Architecture:$Architecture -Runtime:$Runtime
1041+
dnvm-use $PackageVersion -Architecture:$Architecture -Runtime:$Runtime -Persistent:$Persistent
10371042

10381043
if ($Runtime -eq "clr") {
10391044
if (-not $NoNative) {

0 commit comments

Comments
 (0)