Run the given git command and return its stdout, or an error if the command fails.
(args ...string)
| 69 | |
| 70 | // Run the given git command and return its stdout, or an error if the command fails. |
| 71 | func (repo *GitRepo) runGitCommand(args ...string) (string, error) { |
| 72 | stdout, stderr, err := repo.runGitCommandRaw(args...) |
| 73 | if err != nil { |
| 74 | if stderr == "" { |
| 75 | stderr = "Error running git command: " + strings.Join(args, " ") |
| 76 | } |
| 77 | err = fmt.Errorf(stderr) |
| 78 | } |
| 79 | return stdout, err |
| 80 | } |
| 81 | |
| 82 | // Run the given git command and return its stdout, or an error if the command fails. |
| 83 | func (repo *GitRepo) runGitCommandWithEnv(env []string, args ...string) (string, error) { |
no test coverage detected