Skip to content

Commit 1d46f95

Browse files
authored
Merge pull request #144 from SteveL-MSFT/fix-addpath
fix add-path
2 parents 226aa6a + 6d6c1fa commit 1d46f95

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/add-path.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
$pathSeparator = [System.IO.Path]::PathSeparator
88
$paths = $env:PATH.Split($pathSeparator)
9-
if (-not $paths -contains $PWD) {
10-
$env:PATH = $PWD + $pathSeparator + $env:PATH
11-
Write-Host -ForegroundColor Green "Added $PWD to PATH"
9+
if ($paths -notcontains $PWD) {
10+
$env:PATH = "$PWD" + $pathSeparator + $env:PATH
11+
Write-Host -ForegroundColor Green "Added $PWD to `$env:PATH"
1212
}

0 commit comments

Comments
 (0)