mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 15:46:26 -04:00
Fixed loop before error check
This commit is contained in:
parent
f14effe5f5
commit
696d6dc20c
|
|
@ -63,14 +63,14 @@ func (gui *Gui) updateRecentRepoList() error {
|
|||
func (gui *Gui) canShowIsPrivateRepo() bool {
|
||||
repos := gui.Config.GetAppState().RecentPrivateRepos
|
||||
currentRepo, err := os.Getwd()
|
||||
if err != nil {
|
||||
return true
|
||||
}
|
||||
for _, repo := range repos {
|
||||
if currentRepo == repo {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
return true
|
||||
}
|
||||
gui.Config.GetAppState().RecentPrivateRepos = newRecentReposList(repos, currentRepo)
|
||||
_ = gui.Config.SaveAppState()
|
||||
return true
|
||||
|
|
|
|||
Loading…
Reference in a new issue