1
0
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:
mjarkk 2018-12-10 07:43:32 +01:00
parent f14effe5f5
commit 696d6dc20c

View File

@ -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