(name string, args ...string)
| 47 | } |
| 48 | |
| 49 | func ExecCommandWithOptionalSudo(name string, args ...string) *exec.Cmd { |
| 50 | commandName, commandArgs := WrapWithOptionalSudo(name, args...) |
| 51 | return exec.Command(commandName, commandArgs...) |
| 52 | } |
| 53 | |
| 54 | func WriteFileWithOptionalSudo(name string, data []byte, perm os.FileMode) error { |
| 55 | if err := os.WriteFile(name, data, perm); err == nil { |
nothing calls this directly
no test coverage detected