(logger *slog.Logger, name string, arg ...string)
| 13 | } |
| 14 | |
| 15 | func Exec(logger *slog.Logger, name string, arg ...string) error { |
| 16 | out, err := exec.Command(name, arg...).CombinedOutput() |
| 17 | logger.Debug("exec command", "cmd", name, "arg", arg, "out", string(out)) |
| 18 | if err != nil { |
| 19 | return fmt.Errorf("error executing command: %s %s. %w. Output: %s", name, arg, err, out) |
| 20 | } |
| 21 | return nil |
| 22 | } |
no outgoing calls
no test coverage detected