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:
parent
9585f49490
commit
78b2bc4f60
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user