1
0
mirror of https://github.com/go-task/task.git synced 2025-03-17 21:08:01 +02:00
task/execext/exec_win.go
2017-03-12 17:18:59 -03:00

21 lines
341 B
Go

// +build windows
package execext
import (
"os/exec"
)
// NewCommand returns a new command that runs on "sh" is available or on "cmd"
// otherwise on Windows
func NewCommand(c string) *exec.Cmd {
if ShExists {
return newShCommand(c)
}
return newCmdCommand(c)
}
func newCmdCommand(c string) {
return exec.Command("cmd", "/C", c)
}