diff --git a/src/cmd/go/testdata/script/mod_off_init.txt b/src/cmd/go/testdata/script/mod_off_init.txt new file mode 100644 index 0000000000..8dd4bb028c --- /dev/null +++ b/src/cmd/go/testdata/script/mod_off_init.txt @@ -0,0 +1,7 @@ +env GO111MODULE=off + +# This script tests that running go mod init with +# GO111MODULE=off when outside of GOPATH will fatal +# with an error message. +! go mod init +stderr 'go: modules disabled by GO111MODULE=off; see ''go help modules'''