diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-11-02 18:53:20 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-11-02 18:53:20 -0400 |
commit | 7d5f4e73158cfc4837e6fe1ccf609c931c4f87b7 (patch) | |
tree | 8af98da31237013c251b9de490c4d88aa5755195 /src/edit/git.go | |
parent | 1a7dd9bd692ff9db64cea670fa0feaa79c82706d (diff) |
views
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 { |