runExec execs bin. If the platform doesn't support exec, it runs it and waits for it to finish.
(bin string, args []string, e *env)
| 391 | // runExec execs bin. If the platform doesn't support exec, it runs it and waits |
| 392 | // for it to finish. |
| 393 | func runExec(bin string, args []string, e *env) error { |
| 394 | if sysExec != nil { |
| 395 | return sysExec(bin, append([]string{filepath.Base(bin)}, args...), e.flat()) |
| 396 | } |
| 397 | |
| 398 | cmd := exec.Command(bin, args...) |
| 399 | cmd.Env = e.flat() |
| 400 | cmd.Stdout = Stdout |
| 401 | cmd.Stderr = Stderr |
| 402 | return cmd.Run() |
| 403 | } |
| 404 | |
| 405 | type env struct { |
| 406 | m map[string]string |
no test coverage detected