mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +02:00
Remove calls to Error()
Now that we have an error handler set, we can simply let them bubble up all the way to gocui.
This commit is contained in:
parent
325800a72e
commit
82a3d33ce3
35 changed files with 158 additions and 168 deletions
|
@ -165,7 +165,7 @@ func (self *WorkingTreeHelper) HandleCommitPress() error {
|
|||
|
||||
func (self *WorkingTreeHelper) WithEnsureCommitableFiles(handler func() error) error {
|
||||
if err := self.prepareFilesForCommit(); err != nil {
|
||||
return self.c.Error(err)
|
||||
return err
|
||||
}
|
||||
|
||||
if len(self.c.Model().Files) == 0 {
|
||||
|
@ -186,10 +186,10 @@ func (self *WorkingTreeHelper) promptToStageAllAndRetry(retry func() error) erro
|
|||
HandleConfirm: func() error {
|
||||
self.c.LogAction(self.c.Tr.Actions.StageAllFiles)
|
||||
if err := self.c.Git().WorkingTree.StageAll(); err != nil {
|
||||
return self.c.Error(err)
|
||||
return err
|
||||
}
|
||||
if err := self.syncRefresh(); err != nil {
|
||||
return self.c.Error(err)
|
||||
return err
|
||||
}
|
||||
|
||||
return retry()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue