mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-01-20 05:19:24 +02: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…
x
Reference in New Issue
Block a user