1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-19 00:28:03 +02:00

fix windows bash conditional error

This commit is contained in:
Jesse Duffield
2018-08-06 23:53:28 +10:00
parent fc2e3a5316
commit 7e5d7bfe38

View File

@ -178,10 +178,11 @@ func getGitBranches() []Branch {
if branchCheck == "" {
return append(branches, branchFromLine("master", 0))
}
rawString, _ := runDirectCommand(getBranchesCommand)
branchLines := splitLines(rawString)
for i, line := range branchLines {
branches = append(branches, branchFromLine(line, i))
if rawString, err := runDirectCommand(getBranchesCommand); err == nil {
branchLines := splitLines(rawString)
for i, line := range branchLines {
branches = append(branches, branchFromLine(line, i))
}
}
branches = getAndMergeFetchedBranches(branches)
return branches