Update dnvm.
This commit is contained in:
parent
e46896b7cd
commit
1f0531f65e
|
|
@ -513,8 +513,10 @@ function Change-Path() {
|
|||
|
||||
$newPath = $prependPath
|
||||
foreach($portion in $existingPaths.Split(';')) {
|
||||
if(![string]::IsNullOrWhiteSpace($portion)) {
|
||||
$skip = $portion -eq ""
|
||||
foreach($removePath in $removePaths) {
|
||||
if(![string]::IsNullOrWhiteSpace($removePath)) {
|
||||
$removePrefix = if($removePath.EndsWith("\")) { $removePath } else { "$removePath\" }
|
||||
|
||||
if ($removePath -and (($portion -eq $removePath) -or ($portion.StartsWith($removePrefix)))) {
|
||||
|
|
@ -522,6 +524,7 @@ function Change-Path() {
|
|||
$skip = $true
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$skip) {
|
||||
if(![String]::IsNullOrWhiteSpace($newPath)) {
|
||||
$newPath += ";"
|
||||
|
|
@ -529,6 +532,7 @@ function Change-Path() {
|
|||
$newPath += $portion
|
||||
}
|
||||
}
|
||||
}
|
||||
return $newPath
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue