Update dnvm.ps1
This commit is contained in:
parent
7d6f78ed7a
commit
c09e95d4d5
4
dnvm.ps1
4
dnvm.ps1
|
|
@ -1055,7 +1055,7 @@ function dnvm-use {
|
||||||
Set-Path (Change-Path $env:Path "" ($RuntimeDirs))
|
Set-Path (Change-Path $env:Path "" ($RuntimeDirs))
|
||||||
|
|
||||||
if ($Persistent) {
|
if ($Persistent) {
|
||||||
Console-Write "Removing all runtimes from user PATH"
|
_WriteOut "Removing all runtimes from user PATH"
|
||||||
$userPath = [Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::User)
|
$userPath = [Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::User)
|
||||||
$userPath = Change-Path $userPath "" ($RuntimeDirs)
|
$userPath = Change-Path $userPath "" ($RuntimeDirs)
|
||||||
[Environment]::SetEnvironmentVariable("Path", $userPath, [System.EnvironmentVariableTarget]::User)
|
[Environment]::SetEnvironmentVariable("Path", $userPath, [System.EnvironmentVariableTarget]::User)
|
||||||
|
|
@ -1073,7 +1073,7 @@ function dnvm-use {
|
||||||
Set-Path (Change-Path $env:Path $runtimeBin ($RuntimeDirs))
|
Set-Path (Change-Path $env:Path $runtimeBin ($RuntimeDirs))
|
||||||
|
|
||||||
if ($Persistent) {
|
if ($Persistent) {
|
||||||
Console-Write "Adding $runtimeBin to user PATH"
|
_WriteOut "Adding $runtimeBin to user PATH"
|
||||||
$userPath = [Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::User)
|
$userPath = [Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::User)
|
||||||
$userPath = Change-Path $userPath $runtimeBin ($RuntimeDirs)
|
$userPath = Change-Path $userPath $runtimeBin ($RuntimeDirs)
|
||||||
[Environment]::SetEnvironmentVariable("Path", $userPath, [System.EnvironmentVariableTarget]::User)
|
[Environment]::SetEnvironmentVariable("Path", $userPath, [System.EnvironmentVariableTarget]::User)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue