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:
@ -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
|
||||
|
Reference in New Issue
Block a user