cmd/go: clarify suggested action when install
ing a module while -mod=readonly is on
#44975
Labels
FrozenDueToAge
GoCommand
cmd/go
modules
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yep.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
No output and a binary installed in
GOBIN
.What did you see instead?
My intention was to install a helper binary for some tests. Previously, I'd used
go get github.com/mitranim/gow
to install the binary intoGOBIN
(which I place in my PATH), but since my actual application doesn't rely on that module, I was excited to switch toinstall
so I wouldn't have to rungo mod tidy
all the time to clean up after it. Instead, I got the somewhat cryptic error message above. This is related to -mod defaulting to readonly now, it seems.Apparently, the proper invocation is to add a specific version to the install path:
go install github.com/mitranim/gow@latest
does what I expected. It'd be nice if the error-message hinted at that.The text was updated successfully, but these errors were encountered: