You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
424 B
27 lines
424 B
// +build js
|
|
|
|
package testenv
|
|
|
|
import (
|
|
"runtime"
|
|
"strings"
|
|
)
|
|
|
|
// HasExec reports whether the current system can start new processes
|
|
// using os.StartProcess or (more commonly) exec.Command.
|
|
func HasExec() bool {
|
|
switch runtime.GOOS {
|
|
case "nacl":
|
|
return false
|
|
case "darwin":
|
|
if strings.HasPrefix(runtime.GOARCH, "arm") {
|
|
return false
|
|
}
|
|
}
|
|
switch runtime.GOARCH {
|
|
case "js":
|
|
return false
|
|
}
|
|
return true
|
|
}
|