blob: c7b967ccec39d666cf1b64aeaa7b3a7c9fd9f825 [file] [log] [blame]
# windows executables have the .exe extension and won't overwrite source files
[GOOS:windows] skip
mkdir out
env GOTMPDIR=$PWD/out
grep 'this should still exist' foo.go
! go build
stderr 'already exists and is not an object file'
grep 'this should still exist' foo.go
-- go.mod --
module foo.go
-- foo.go --
package main // this should still exist
func main() {}