github.com/goplusjs/gopherjs@v1.2.6-0.20211206034512-f187917453b8/compiler/natives/src/internal/testenv/testenv.go (about) 1 // +build js 2 3 package testenv 4 5 import ( 6 "runtime" 7 "strings" 8 ) 9 10 // HasExec reports whether the current system can start new processes 11 // using os.StartProcess or (more commonly) exec.Command. 12 func HasExec() bool { 13 switch runtime.GOOS { 14 case "nacl": 15 return false 16 case "darwin": 17 if strings.HasPrefix(runtime.GOARCH, "arm") { 18 return false 19 } 20 } 21 switch runtime.GOARCH { 22 case "js": 23 return false 24 } 25 return true 26 }