ref(windows): use Sync-EnvPath to guarantee $Env:Path correctness

This commit is contained in:
AJ ONeal
2023-11-11 13:18:20 -07:00
parent 22fd0a8a0a
commit 82d8d3a6cb
7 changed files with 7 additions and 28 deletions
+1 -5
View File
@@ -39,11 +39,7 @@ function fn_git_shallow_clone {
Write-Output "Checking for Git..."
IF (-Not (Get-Command -Name "git" -ErrorAction Silent)) {
& "$HOME\.local\bin\webi-pwsh.ps1" git
$Env:Path = "$HOME\.local\opt\git\cmd;$Env:Path"
[System.Environment]::SetEnvironmentVariable(
"Path",
$env:Path,
[System.EnvironmentVariableTarget]::User)
$null = Sync-EnvPath
}
Write-Output "Cloning $Env:PKG_NAME from $Env:WEBI_PKG_URL to $pkg_src"