diff options
author | Jay Conrod <jayconrod@google.com> | 2020-09-15 10:14:15 -0400 |
---|---|---|
committer | Jay Conrod <jayconrod@google.com> | 2020-09-15 14:51:32 +0000 |
commit | f1c400a06393aad55cd4758fc78ccd7aec379ec0 (patch) | |
tree | 7f58b4f95d12022a0cce31440f549e45a9d0f512 /src/cmd/go/testdata/script/mod_outside.txt | |
parent | 03875bd9bc112d25a4496f7ff22888f23a26baea (diff) | |
download | go-f1c400a06393aad55cd4758fc78ccd7aec379ec0.tar.gz go-f1c400a06393aad55cd4758fc78ccd7aec379ec0.zip |
cmd/go: fix broken mod_outside test
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>
Diffstat (limited to 'src/cmd/go/testdata/script/mod_outside.txt')
-rw-r--r-- | src/cmd/go/testdata/script/mod_outside.txt | 7 |
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 2001c45c3c..e398f7bc40 100644 --- a/src/cmd/go/testdata/script/mod_outside.txt +++ b/src/cmd/go/testdata/script/mod_outside.txt @@ -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 |