runExec execs bin. If the platform doesn't support exec, it runs it and waits for it to finish.
(bin string, args []string, env *Env)
| 55 | // runExec execs bin. If the platform doesn't support exec, it runs it and waits |
| 56 | // for it to finish. |
| 57 | func runExec(bin string, args []string, env *Env) error { |
| 58 | if sysExec != nil { |
| 59 | sysExec(bin, append([]string{filepath.Base(bin)}, args...), env.Flat()) |
| 60 | } |
| 61 | |
| 62 | cmd := exec.Command(bin, args...) |
| 63 | cmd.Env = env.Flat() |
| 64 | cmd.Stdout = os.Stdout |
| 65 | cmd.Stderr = os.Stderr |
| 66 | if err := cmd.Start(); err != nil { |
| 67 | return fmt.Errorf("Could not run %v: %v", bin, err) |
| 68 | } |
| 69 | go handleSignals(cmd.Process) |
| 70 | return cmd.Wait() |
| 71 | } |
| 72 | |
| 73 | // cpDir copies the contents of src dir into dst dir. |
| 74 | // filter is a list of file suffixes to skip. ex: ".go" |
no test coverage detected