ExecCommand is a small platform specific wrapper around os/exec.Command
(name string, arg ...string)
| 10 | |
| 11 | // ExecCommand is a small platform specific wrapper around os/exec.Command |
| 12 | func ExecCommand(name string, arg ...string) (*Cmd, error) { |
| 13 | cmd := exec.Command(name, arg...) |
| 14 | var err error |
| 15 | cmd.Path, err = LookPath(name) |
| 16 | if err != nil { |
| 17 | return nil, err |
| 18 | } |
| 19 | cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true} |
| 20 | cmd.Env = fetchEnvironment() |
| 21 | return newCmd(cmd), nil |
| 22 | } |
no test coverage detected