Skip to content

Commit ce39b2d

Browse files
committed
pwsh\Init-App.ps1 - RemoveFromEnvPath
- critical bug fix, reaffirms that soem code review is required in this code base
1 parent 31757a8 commit ce39b2d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pwsh/Init-App.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function AddKTAppToEnv([string] $App = '', [string] $PFilesX64PTDir = '', [strin
6666
}
6767

6868
function RemoveFromEnvPath([string] $path = '') {
69-
if (-not [string]::IsNullOrEmpty($path)) {
69+
if ([string]::IsNullOrEmpty($path)) {
7070
Write-Host "Empty string: $path"
7171
return
7272
}
@@ -131,7 +131,6 @@ function InitVariables([string] $InitType = 'resetEnvPath') {
131131
'\Microsoft\WindowsApps;C:\windows\System32\WindowsPowerShell\v1.0;' + $ShellHome + ';' +
132132
$PSHOME + ';' + 'C:\WINDOWS\System32\OpenSSH\'
133133

134-
135134
# TODO: iterate over a list instead
136135
# check if Linus uses DOTNET_ROOT after installing dotnet
137136
if (Test-Path Env:DOTNET_ROOT) { Remove-Item Env:DOTNET_ROOT }

0 commit comments

Comments
 (0)