1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-04 03:48:07 +02:00

Made a better way of test pushing

This commit is contained in:
mjarkk 2018-10-31 16:23:58 +01:00
parent 9585f49490
commit 78b2bc4f60

View File

@ -1022,7 +1022,12 @@ func TestGitCommandPush(t *testing.T) {
return "-"
})
errMessage := err.Error()
if strings.Contains(errMessage, "error: src refspec test does not match any.") {
cutrange := 43
if len(errMessage) < 43 {
cutrange = len(errMessage)
}
testMessage := errMessage[:cutrange]
if strings.Contains("error: src refspec test does not match any.", testMessage) {
err = nil
}
s.test(err)