! go run $PWD
! stderr 'no packages loaded'
stderr '^package example.net/nonmain is not a main package$'

! go run .
stderr '^package example.net/nonmain is not a main package$'

! go run ./...
stderr '^go: warning: "\./\.\.\." matched only non-main packages$'
stderr '^go: no packages loaded from \./\.\.\.$'

-- go.mod --
module example.net/nonmain

go 1.17
-- nonmain.go --
// Package nonmain is not a main package.
package nonmain
