mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-25 18:55:28 -06:00
fix windows bash conditional error
This commit is contained in:
parent
fc2e3a5316
commit
7e5d7bfe38
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user