diff --git a/src/powershell-extended/PROFILE.AllUsersAllHosts.ps1 b/src/powershell-extended/PROFILE.AllUsersAllHosts.ps1 index 205d206..ebc6d7f 100644 --- a/src/powershell-extended/PROFILE.AllUsersAllHosts.ps1 +++ b/src/powershell-extended/PROFILE.AllUsersAllHosts.ps1 @@ -85,8 +85,9 @@ try { #region Environment Variables ================================================== # Add local bin directory to PATH if not already present - if ($__PSProfileEnvPathOriginal.Split(':') -notcontains "${HOME}/bin") { [System.Environment]::SetEnvironmentVariable('PATH', "${__PSProfileEnvPathOriginal}:${HOME}/bin") } - if ($__PSProfileEnvPathOriginal.Split(':') -notcontains "${HOME}/.local/bin") { [System.Environment]::SetEnvironmentVariable('PATH', "${__PSProfileEnvPathOriginal}:${HOME}/.local/bin") } + if ($__PSProfileEnvPathOriginal.Split(':') -notcontains "${HOME}/bin") { [System.Environment]::SetEnvironmentVariable('PATH', "$([System.Environment]::GetEnvironmentVariable('PATH')):${HOME}/bin") } + if ($__PSProfileEnvPathOriginal.Split(':') -notcontains "${HOME}/.local/bin") { [System.Environment]::SetEnvironmentVariable('PATH', "$([System.Environment]::GetEnvironmentVariable('PATH')):${HOME}/.local/bin") } + if ($__PSProfileEnvPathOriginal.Split(':') -notcontains "${HOME}/.local/share/powershell/Scripts") { [System.Environment]::SetEnvironmentVariable('PATH', "$([System.Environment]::GetEnvironmentVariable('PATH')):${HOME}/.local/share/powershell/Scripts") } # Set the USER environment variable if not already set if ($null -eq [System.Environment]::GetEnvironmentVariable('USER') -and $null -eq [System.Environment]::GetEnvironmentVariable('USERNAME')) { [System.Environment]::SetEnvironmentVariable('USER', (/usr/bin/whoami)) }