# go get in GO111MODULE=auto should warn when not using modules and go.mod exists

env GO111MODULE=auto
mkdir z
cd z
! go get # fails because no code in directory, not the warning
stderr 'go get: warning: modules disabled by GO111MODULE=auto in GOPATH/src;\n\tignoring ..[/\\]go.mod;\n\tsee ''go help modules'''

-- go.mod --
module x
