mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-01-20 05:19:24 +02:00
Made a better way of test pushing
This commit is contained in:
parent
9585f49490
commit
78b2bc4f60
@ -1022,7 +1022,12 @@ func TestGitCommandPush(t *testing.T) {
|
|||||||
return "-"
|
return "-"
|
||||||
})
|
})
|
||||||
errMessage := err.Error()
|
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
|
err = nil
|
||||||
}
|
}
|
||||||
s.test(err)
|
s.test(err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user