golang/go
View on GitHubcmd/go: fail if the user tries to modify the GOMOD environment variable
Open
#51,217 opened on Feb 15, 2022
GoCommandNeedsFixhelp wantedmodules
Repository metrics
- Stars
- (133,883 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
See https://github.com/golang/go/issues/51171#issuecomment-1040765860. The user likely wants to either use -modfile, or cd into the right directory to enter or leave a module. Right now, a command like GOMOD=foo.mod go list will happily ignore GOMOD=foo.mod.
cc @bcmills @matloob