Skip to content

Commit

Permalink
analysis/lint/testutil: unset GO111MODULE in test
Browse files Browse the repository at this point in the history
In Debian packaging system, GO111MODULE is set to off. This causes
various test failures due to dialog message mismatch.

(cherry picked from commit 767128c)
  • Loading branch information
zhsj authored and dominikh committed Aug 14, 2024
1 parent d6ea187 commit 516152d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion analysis/lint/testutil/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func Run(t *testing.T, a *lint.Analyzer) {
cfg := &packages.Config{
Dir: dir,
Tests: true,
Env: append(os.Environ(), "GOPROXY=off", "GOFLAGS=-mod=vendor"),
Env: append(os.Environ(), "GOPROXY=off", "GOFLAGS=-mod=vendor", "GO111MODULE="),
Overlay: map[string][]byte{
"go.mod": []byte("module example.com\ngo " + strings.TrimPrefix(vers, "go")),
},
Expand Down

0 comments on commit 516152d

Please # to comment.