Skip to content

Commit 97f1077

Browse files
committed
update win_path_add
1 parent dfc3c48 commit 97f1077

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

os/win.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ function win_path_add($addPath) {
278278
$arrPath = $path -split ';' | Where-Object { $_ -notMatch "^$regexAddPath\\?" }
279279
$newpath = ($arrPath + $addPath) -join ';'
280280
[Environment]::SetEnvironmentVariable("path", $newpath, 'User')
281+
$env:path = [Environment]::GetEnvironmentVariable("path", "User") + ";" + [Environment]::GetEnvironmentVariable("path", "Machine")
281282
}
282283

283284
function win_path_list() {

0 commit comments

Comments
 (0)