Run the given git command with the given I/O reader/writers and environment, returning an error if it fails.
(stdin io.Reader, stdout, stderr io.Writer, env []string, args ...string)
| 45 | |
| 46 | // Run the given git command with the given I/O reader/writers and environment, returning an error if it fails. |
| 47 | func (repo *GitRepo) runGitCommandWithIOAndEnv(stdin io.Reader, stdout, stderr io.Writer, env []string, args ...string) error { |
| 48 | cmd := exec.Command("git", args...) |
| 49 | cmd.Dir = repo.Path |
| 50 | cmd.Stdin = stdin |
| 51 | cmd.Stdout = stdout |
| 52 | cmd.Stderr = stderr |
| 53 | cmd.Env = env |
| 54 | return cmd.Run() |
| 55 | } |
| 56 | |
| 57 | // Run the given git command with the given I/O reader/writers, returning an error if it fails. |
| 58 | func (repo *GitRepo) runGitCommandWithIO(stdin io.Reader, stdout, stderr io.Writer, args ...string) error { |
no test coverage detected