From e6192b8056ccc9c10d19056348c0294304348e64 Mon Sep 17 00:00:00 2001 From: A13501350 <18516149786@163.com> Date: Tue, 21 Oct 2025 01:31:22 +0800 Subject: [PATCH] fix: go bin location --- .github/workflows/test-ci-windows.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-ci-windows.yml b/.github/workflows/test-ci-windows.yml index f4fa32c7..35614cb7 100644 --- a/.github/workflows/test-ci-windows.yml +++ b/.github/workflows/test-ci-windows.yml @@ -306,6 +306,13 @@ jobs: $testRuleDir = "C:\Program Files\ModSecurity IIS\coreruleset\tests\regression\tests" go install github.com/coreruleset/go-ftw@latest - cd go\bin - & go-ftw.exe -d $testRuleDir --cloud -e 920380-1 --show-failures-only + $goBinPath = "" + if ($env:GOBIN) { + $goBinPath = $env:GOBIN + } elseif ($env:GOPATH) { + $goBinPath = Join-Path $env:GOPATH "bin" + } else { + $goBinPath = Join-Path $env:USERPROFILE "go\bin" + } + & "$goBinPath\go-ftw.exe" -d $testRuleDir --cloud -e 920380-1 --show-failures-only