aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/modload/init.go
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2021-04-14 10:16:51 -0400
committerBryan C. Mills <bcmills@google.com>2021-04-14 15:02:11 +0000
commitc98026c104dece6cf9aa6cf3f651dd16a0156cf2 (patch)
treefc826b8a4e28617023dcf9f6111f8af703abd349 /src/cmd/go/internal/modload/init.go
parent72483de87a36969f0c4d6f01db19f769c8e16e82 (diff)
downloadgo-c98026c104dece6cf9aa6cf3f651dd16a0156cf2.tar.gz
go-c98026c104dece6cf9aa6cf3f651dd16a0156cf2.zip
cmd/go/internal/modload: fix truncated error message from goModDirtyError
The 'go mod tidy' hint was truncated due to a typo in CL 293689, and that particular case was not covered by any existing test. Updates #36460 Updates #40775 Change-Id: Ib6fa872a9dfdafc4e9a112e8add2ff5aecd2dbd0 Reviewed-on: https://go-review.googlesource.com/c/go/+/310089 Trust: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'src/cmd/go/internal/modload/init.go')
-rw-r--r--src/cmd/go/internal/modload/init.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/go/internal/modload/init.go b/src/cmd/go/internal/modload/init.go
index 777b63841f..120afef4ff 100644
--- a/src/cmd/go/internal/modload/init.go
+++ b/src/cmd/go/internal/modload/init.go
@@ -354,7 +354,7 @@ func (goModDirtyError) Error() string {
return fmt.Sprintf("updates to go.mod needed, disabled by -mod=%v; to update it:\n\tgo mod tidy", cfg.BuildMod)
}
if cfg.BuildModReason != "" {
- return fmt.Sprintf("updates to go.mod needed, disabled by -mod=%s\n\t(%s)\n\tto update it:\n\t", cfg.BuildMod, cfg.BuildModReason)
+ return fmt.Sprintf("updates to go.mod needed, disabled by -mod=%s\n\t(%s)\n\tto update it:\n\tgo mod tidy", cfg.BuildMod, cfg.BuildModReason)
}
return "updates to go.mod needed; to update it:\n\tgo mod tidy"
}