aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/mod_outside.txt
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2019-11-03 20:53:47 -0500
committerBryan C. Mills <bcmills@google.com>2019-11-05 18:03:54 +0000
commita9c0cc6f6744654de7f8fdff52f5da601a109d11 (patch)
treee3518272aa373211070d0089815cb05fd622a0b1 /src/cmd/go/testdata/script/mod_outside.txt
parent95149147d86ad33a82a5d0115bbb9c623cd7cade (diff)
downloadgo-a9c0cc6f6744654de7f8fdff52f5da601a109d11.tar.gz
go-a9c0cc6f6744654de7f8fdff52f5da601a109d11.zip
cmd/go: make 'go mod why' require a main module
Updates #32027 Change-Id: Ifc9427f35188c3fd356917d8510f3e01866ebca8 Reviewed-on: https://go-review.googlesource.com/c/go/+/205065 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
Diffstat (limited to 'src/cmd/go/testdata/script/mod_outside.txt')
-rw-r--r--src/cmd/go/testdata/script/mod_outside.txt7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cmd/go/testdata/script/mod_outside.txt b/src/cmd/go/testdata/script/mod_outside.txt
index 6f569ca351..34570c76c2 100644
--- a/src/cmd/go/testdata/script/mod_outside.txt
+++ b/src/cmd/go/testdata/script/mod_outside.txt
@@ -67,10 +67,9 @@ go mod graph
! stdout .
! stderr .
-# 'go mod why' should report that nothing is a dependency.
-go mod why -m example.com/version
-stdout 'does not need'
-
+# 'go mod why' should fail, since there is no main module to depend on anything.
+! go mod why -m example.com/version
+stderr 'cannot find main module'
# 'go mod edit', 'go mod tidy', and 'go mod fmt' should fail:
# there is no go.mod file to edit.