diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-06 13:49:15 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-06 13:49:15 +1000 |
commit | 9a3b565806689a35f1d330c233dbbc725bb7ebe8 (patch) | |
tree | 723db107a9553c2a6d6718ef2b80d52a6aba28bd /gitcommands.go | |
parent | 6126ddd373ddf18b96566eb1ddc204f017b449cb (diff) |
add vscode keybinding
Diffstat (limited to 'gitcommands.go')
-rw-r--r-- | gitcommands.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gitcommands.go b/gitcommands.go index e0f5bacfe..719a8ceb0 100644 --- a/gitcommands.go +++ b/gitcommands.go @@ -305,7 +305,11 @@ func runCommand(command string) (string, error) { splitCmd := strings.Split(command, " ") cmdOut, err := exec.Command(splitCmd[0], splitCmd[1:]...).CombinedOutput() devLog("run command time: ", time.Now().Sub(commandStartTime)) - return string(cmdOut), err + outputString := string(cmdOut) + if outputString == "" && err != nil { + return err.Error(), err + } + return outputString, err } func openFile(filename string) (string, error) { |