bwplotka / bingo

Like `go get` but for Go tools! CI Automating versioning of Go binaries in a nested, isolated Go modules.
Apache License 2.0
342 stars 29 forks source link

Disable Go workspaces when running the bingo commands #117

Closed nacx closed 1 year ago

nacx commented 2 years ago

When using Go workspaces with Go 1.18, bingo fails with errors like:

(re)installing /Users/nacx/go/bin/goimports-v0.1.5
go: -mod may only be set to readonly when in workspace mode, but it is set to "mod"
    Remove the -mod flag to use the default readonly value,
    or set GOWORK=off to disable workspace mode.
make: *** [/Users/nacx/src/ngac/scripts//../.bingo/Variables.mk:30: /Users/nacx/go/bin/goimports-v0.1.5] Error 1

This PR always sets the GOWORK=off environment variable to disable workspaces for the Bingo commands. This should be safe as Bingo is scoped to its own folder and does not affect the normal project build.