]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: fix broken mod_outside test
authorJay Conrod <jayconrod@google.com>
Tue, 15 Sep 2020 14:14:15 +0000 (10:14 -0400)
committerJay Conrod <jayconrod@google.com>
Tue, 15 Sep 2020 14:51:32 +0000 (14:51 +0000)
Since CL 254369, 'go mod graph' now reports an error when invoked
outside a module. This broke the mod_outside test, which expected
'go mod graph' to succeed with no output.

Change-Id: Ic30ee68f1f4c4d33795bdf7df70a7631fb9395e5
Reviewed-on: https://go-review.googlesource.com/c/go/+/255017
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>

src/cmd/go/testdata/script/mod_outside.txt

index 2001c45c3cf4a29b5a1263d80c957e15825d554e..e398f7bc40b0b4df528b8dbf21ee091ad3b2050c 100644 (file)
@@ -69,10 +69,9 @@ go clean -n
 ! stdout .
 ! stderr .
 
-# 'go mod graph' should not display anything, since there are no active modules.
-go mod graph
-! stdout .
-! stderr .
+# 'go mod graph' should fail, since there's no module graph.
+! go mod graph
+stderr 'cannot find main module'
 
 # 'go mod why' should fail, since there is no main module to depend on anything.
 ! go mod why -m example.com/version