aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/modget/query.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/go/internal/modget/query.go')
-rw-r--r--src/cmd/go/internal/modget/query.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/go/internal/modget/query.go b/src/cmd/go/internal/modget/query.go
index d8364c8c0d..1a5a60f7eb 100644
--- a/src/cmd/go/internal/modget/query.go
+++ b/src/cmd/go/internal/modget/query.go
@@ -186,7 +186,7 @@ func (q *query) validate() error {
if q.pattern == "all" {
// If there is no main module, "all" is not meaningful.
if !modload.HasModRoot() {
- return fmt.Errorf(`cannot match "all": working directory is not part of a module`)
+ return fmt.Errorf(`cannot match "all": %v`, modload.ErrNoModRoot)
}
if !versionOkForMainModule(q.version) {
// TODO(bcmills): "all@none" seems like a totally reasonable way to