diff --git a/testscript/exe.go b/testscript/exe.go index ed6bd98d..12706c7e 100644 --- a/testscript/exe.go +++ b/testscript/exe.go @@ -122,7 +122,7 @@ func RunMain(m TestingM, commands map[string]func() int) (exitCode int) { // system's temporary directory, like we do. We don't use hard links on Windows, // as that can lead to "access denied" errors when removing. func copyBinary(from, to string) error { - if runtime.GOOS != "windows" { + if runtime.GOOS != "windows" && runtime.GOOS != "darwin" { if err := os.Link(from, to); err == nil { return nil }