Skip to content

Commit 31dd65c

Browse files
ynstaclaude
andcommitted
fix(ci): drop workflow-level GOFLAGS=-mod=vendor from release pipeline
The `vendor/` directory + `go.mod` >= go 1.14 already auto-select vendor mode for build/test/lint, so the explicit `GOFLAGS=-mod=vendor` was redundant — and worse, it broke every `go install <pkg>@<version>` call in the pipeline: go: golang.org/x/vuln/cmd/govulncheck@latest: cannot query module due to -mod=vendor This killed `govulncheck` immediately and would have killed `license-check` (go-licenses) the same way. Vendor mode still applies implicitly to the actual `go build` / `go test` / `go generate` calls, so dropping the env var is a no-op for those. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent afe71a8 commit 31dd65c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@ on:
1616
permissions:
1717
contents: read
1818

19-
env:
20-
GOFLAGS: -mod=vendor
19+
# NOTE: do not set `GOFLAGS: -mod=vendor` at workflow level. With a
20+
# committed `vendor/` directory and `go.mod` >= go 1.14, the toolchain
21+
# already auto-selects vendor mode for build/test/lint. Setting the env
22+
# var explicitly *breaks* `go install <pkg>@<version>` (used to fetch
23+
# govulncheck and go-licenses), which fails with:
24+
# `cannot query module due to -mod=vendor`.
2125

2226
jobs:
2327
lint:

0 commit comments

Comments
 (0)