From 46d2c358a76def8c8fc98a39fa0ab0db1f88c2ac Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 31 Oct 2023 18:33:15 +0000 Subject: [PATCH] fix(xcaddy): check for 'go' with 'Get-Command' in PowerShell rather than exact path --- xcaddy/install.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcaddy/install.ps1 b/xcaddy/install.ps1 index f0ffc5f..aed34b6 100644 --- a/xcaddy/install.ps1 +++ b/xcaddy/install.ps1 @@ -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 }