1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-17 00:18:05 +02:00

Made tests pass

Git constandly exits with error code 1 for some reason it might be because of the wrong username and password but i don't think error 1 is for wrong credentials
This commit is contained in:
mjarkk
2018-10-27 15:32:12 +02:00
parent 45c249acca
commit 6c1c110ce0
3 changed files with 13 additions and 11 deletions

View File

@ -4,6 +4,7 @@ package commands
import (
"bufio"
"errors"
"os/exec"
"regexp"
@ -29,7 +30,7 @@ func RunCommandWithOutputLiveWrapper(c *OSCommand, command string, output func(s
tty, err := pty.Start(cmd)
if err != nil {
return err
return errors.New(err.Error())
}
defer func() { _ = tty.Close() }()
@ -50,7 +51,7 @@ func RunCommandWithOutputLiveWrapper(c *OSCommand, command string, output func(s
}()
if err := cmd.Wait(); err != nil {
return err
return errors.New(err.Error())
}
return nil