(name string, args ...string)
| 40 | } |
| 41 | |
| 42 | func WrapWithOptionalSudo(name string, args ...string) (string, []string) { |
| 43 | if SudoHandleCmd() == "" { |
| 44 | return name, args |
| 45 | } |
| 46 | return "sudo", append([]string{"-n", name}, args...) |
| 47 | } |
| 48 | |
| 49 | func ExecCommandWithOptionalSudo(name string, args ...string) *exec.Cmd { |
| 50 | commandName, commandArgs := WrapWithOptionalSudo(name, args...) |
no test coverage detected