12 lines
259 B
Go
12 lines
259 B
Go
package lib
|
|
|
|
import "os/exec"
|
|
|
|
func execGitCommand(dir string, parts ...string) (string, error) {
|
|
args := append([]string{"-C", dir}, parts...)
|
|
command := exec.Command("git", args...)
|
|
|
|
output, err := command.CombinedOutput()
|
|
|
|
return string(output), err
|
|
}
|