cmd/go: go mod edit -replace succeeds even when there isn't a module to replace #39009
Labels
FrozenDueToAge
GoCommand
cmd/go
modules
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
I believe this is invalid behavior and unexpected.
What version of Go are you using (
go version
)?What did you do?
cat go.mod module example go 1.13 go mod edit -replace github.com/pkg/errors=/tmp/errors cat go.mod module example go 1.13 replace github.com/pkg/errors => /tmp/errors
What did you expect to see?
an error about replacing a unknown module.
What did you see instead?
a replace statement was added to go.mod.
The text was updated successfully, but these errors were encountered: