mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-17 12:06:38 +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 {
|
func (gui *Gui) canShowIsPrivateRepo() bool {
|
||||||
repos := gui.Config.GetAppState().RecentPrivateRepos
|
repos := gui.Config.GetAppState().RecentPrivateRepos
|
||||||
currentRepo, err := os.Getwd()
|
currentRepo, err := os.Getwd()
|
||||||
|
if err != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
for _, repo := range repos {
|
for _, repo := range repos {
|
||||||
if currentRepo == repo {
|
if currentRepo == repo {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if err != nil {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
gui.Config.GetAppState().RecentPrivateRepos = newRecentReposList(repos, currentRepo)
|
gui.Config.GetAppState().RecentPrivateRepos = newRecentReposList(repos, currentRepo)
|
||||||
_ = gui.Config.SaveAppState()
|
_ = gui.Config.SaveAppState()
|
||||||
return true
|
return true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user