1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Remove ErrorMsg

There is no reason any more for application code to show error messages in a
panel. Just return an error instead.
This commit is contained in:
Stefan Haller
2024-04-15 08:25:17 +02:00
parent 723b92916d
commit caad553502
27 changed files with 98 additions and 73 deletions

View File

@ -1,6 +1,7 @@
package helpers
import (
"errors"
"path/filepath"
"strings"
"time"
@ -167,7 +168,7 @@ func (self *CommitsHelper) HandleCommitConfirm() error {
summary, description := self.getCommitSummary(), self.getCommitDescription()
if summary == "" {
return self.c.ErrorMsg(self.c.Tr.CommitWithoutMessageErr)
return errors.New(self.c.Tr.CommitWithoutMessageErr)
}
err := self.c.Contexts().CommitMessage.OnConfirm(summary, description)