diff options
Diffstat (limited to 'src/edit/git.go')
-rw-r--r-- | src/edit/git.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/edit/git.go b/src/edit/git.go index 715a703..25d46cc 100644 --- a/src/edit/git.go +++ b/src/edit/git.go @@ -10,12 +10,17 @@ import ( "time" ) +// Use .Output() instead of .Run() so that it populates +// ExitError.Stderr. + func GitPull() error { - return exec.Command("git", "fetch").Run() + _, err := exec.Command("git", "fetch").Output() + return err } func GitPush() error { - return exec.Command("git", "push").Run() + _, err := exec.Command("git", "push").Output() + return err } type Edit struct { |