fix(xcaddy): check for 'go' with 'Get-Command' in PowerShell rather than exact path

This commit is contained in:
AJ ONeal
2023-10-31 15:07:58 -06:00
parent f68f5b2c13
commit 46d2c358a7
+1 -1
View File
@@ -21,7 +21,7 @@ $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE"
# Fetch Go compiler
Write-Output "Checking for Go compiler..."
IF (-not (Test-Path "$Env:USERPROFILE\.local\opt\go")) {
IF (-Not (Get-Command -Name "go" -ErrorAction Silent)) {
& "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1" go
}