(command string, args ...string)
| 432 | } |
| 433 | |
| 434 | func run(command string, args ...string) (string, error) { |
| 435 | cmd := exec.Command(command, args...) |
| 436 | out, err := cmd.CombinedOutput() |
| 437 | if err != nil { |
| 438 | return "", xerrors.Errorf("command failed: %q: %w\n%s", fmt.Sprintf("%s %s", command, strings.Join(args, " ")), err, out) |
| 439 | } |
| 440 | return strings.TrimSpace(string(out)), nil |
| 441 | } |
no test coverage detected