mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 12:55:47 +02:00
pull errors out of package scope and store sentinel errors on the gui struct
This commit is contained in:
parent
4d0702fba5
commit
ba2b6fbf1f
5 changed files with 49 additions and 44 deletions
|
@ -12,13 +12,13 @@ func (gui *Gui) handleCommitConfirm(g *gocui.Gui, v *gocui.View) error {
|
|||
sub, err := gui.GitCommand.Commit(g, message)
|
||||
if err != nil {
|
||||
// TODO need to find a way to send through this error
|
||||
if err != ErrSubProcess {
|
||||
if err != gui.Errors.ErrSubProcess {
|
||||
return gui.createErrorPanel(g, err.Error())
|
||||
}
|
||||
}
|
||||
if sub != nil {
|
||||
gui.SubProcess = sub
|
||||
return ErrSubProcess
|
||||
return gui.Errors.ErrSubProcess
|
||||
}
|
||||
gui.refreshFiles(g)
|
||||
v.Clear()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue