(args ...string)
| 19 | } |
| 20 | |
| 21 | func (s SpreadCli) ExecGitCmd(args ...string) { |
| 22 | git, err := exec.LookPath("git") |
| 23 | if err != nil { |
| 24 | s.fatalf("Could not locate git: %v", err) |
| 25 | } |
| 26 | |
| 27 | proj := s.projectOrDie() |
| 28 | gitDir := filepath.Join(proj.Path, "git") |
| 29 | |
| 30 | gitArgs := []string{git, "--git-dir=" + gitDir} |
| 31 | gitArgs = append(gitArgs, args...) |
| 32 | |
| 33 | err = syscall.Exec(git, gitArgs, []string{}) |
| 34 | if err != nil { |
| 35 | s.fatalf("could not run git: %v", err) |
| 36 | } |
| 37 | } |
no test coverage detected