Commit 41708ff
committed
fix: prevent stale vendor/ from triggering inconsistent vendoring in CI
actions/checkout does not always remove previously-tracked files that
were deleted in a later commit. A runner that checked out a commit with
vendor/ and then checks out a commit without it may still find vendor/
on disk, causing Go to auto-activate vendor mode and fail with
'inconsistent vendoring'.
Add GOFLAGS=-mod=mod at workflow level so all jobs explicitly use module
mode regardless of whether a stale vendor/ directory exists on disk.
Also fix an off-by-one in the compile_binary diagnostic: repo_root was
computed 3 levels up from test/helpers/ (reaching the parent of the repo)
instead of 2 levels up (the repo root itself), causing the
vendor/modules.txt presence check to report a false negative.1 parent 31df1b6 commit 41708ff
2 files changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
9 | 17 | | |
10 | 18 | | |
11 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
0 commit comments