Exec is wrapper over syscall.Exec, invokes the execve(2) system call. On windows it executes Run with the same arguments.
(name string, arg ...string)
| 39 | // Exec is wrapper over syscall.Exec, invokes the execve(2) system call. On |
| 40 | // windows it executes Run with the same arguments. |
| 41 | func Exec(name string, arg ...string) { |
| 42 | if runtime.GOOS == "windows" { |
| 43 | Run(name, arg...) |
| 44 | return |
| 45 | } |
| 46 | args := append([]string{name}, arg...) |
| 47 | if err := sysutils.Exec(name, args, os.Environ()); err != nil { |
| 48 | errorAndExit(name, err) |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | // Run is a wrapper over os/exec Cmd.Run that configures Stderr/Stdin/Stdout |
| 53 | // to the current ones and wait until the process finishes, exiting with the |
no test coverage detected
searching dependent graphs…