cmd/go: improve error message from '-mod=readonly' #29118
Labels
GoCommand
cmd/go
modules
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Run
go build -mod=readonly
when an update ofgo.mod
is needed.What did you expect to see?
A more descriptive error message. Since
-mod=readonly
is typically supposed to be used in CI, it will save a lot of manual work if the error message did actually tell why an update togo.mod
is needed.E.g.:
go: github.com/sirupsen/[email protected] requires github.com/stretchr/[email protected], but go.mod require @v1.2.1 and updates is disabled by -mod=readonly
What did you see instead?
go: updates to go.mod needed, disabled by -mod=readonly
The text was updated successfully, but these errors were encountered: