fix(xcaddy): use updated PATH after installing Go

This commit is contained in:
AJ ONeal
2023-10-31 15:07:58 -06:00
parent 46d2c358a7
commit 927151100a
+6
View File
@@ -23,6 +23,12 @@ $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE"
Write-Output "Checking for Go compiler..."
IF (-Not (Get-Command -Name "go" -ErrorAction Silent)) {
& "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1" go
$Env:Path = "$HOME\.local\opt\go\bin;$Env:Path"
$Env:Path = "$HOME\go\bin;$Env:Path"
[System.Environment]::SetEnvironmentVariable(
"Path",
$env:Path,
[System.EnvironmentVariableTarget]::User)
}
# Fetch archive