mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-13 13:59:06 +02:00
do not create error panel for sentinel errors
This commit is contained in:
parent
afd669194a
commit
45a0378c01
@ -244,5 +244,11 @@ func (gui *Gui) createErrorPanel(message string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (gui *Gui) surfaceError(err error) error {
|
func (gui *Gui) surfaceError(err error) error {
|
||||||
|
for _, sentinelError := range gui.sentinelErrorsArr() {
|
||||||
|
if err == sentinelError {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return gui.createErrorPanel(err.Error())
|
return gui.createErrorPanel(err.Error())
|
||||||
}
|
}
|
||||||
|
@ -72,6 +72,15 @@ func (gui *Gui) GenerateSentinelErrors() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (gui *Gui) sentinelErrorsArr() []error {
|
||||||
|
return []error{
|
||||||
|
gui.Errors.ErrSubProcess,
|
||||||
|
gui.Errors.ErrNoFiles,
|
||||||
|
gui.Errors.ErrSwitchRepo,
|
||||||
|
gui.Errors.ErrRestart,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Teml is short for template used to make the required map[string]interface{} shorter when using gui.Tr.SLocalize and gui.Tr.TemplateLocalize
|
// Teml is short for template used to make the required map[string]interface{} shorter when using gui.Tr.SLocalize and gui.Tr.TemplateLocalize
|
||||||
type Teml i18n.Teml
|
type Teml i18n.Teml
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user