mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
Panic when trying to use RefreshOptions.Then with mode ASYNC
This doesn't work, and since it took me a while of debugging to figure this out, alert other developers earlier when they try to do it.
This commit is contained in:
parent
93d19db158
commit
d74c817fd8
1 changed files with 4 additions and 0 deletions
|
@ -51,6 +51,10 @@ func NewRefreshHelper(
|
|||
}
|
||||
|
||||
func (self *RefreshHelper) Refresh(options types.RefreshOptions) error {
|
||||
if options.Mode == types.ASYNC && options.Then != nil {
|
||||
panic("RefreshOptions.Then doesn't work with mode ASYNC")
|
||||
}
|
||||
|
||||
t := time.Now()
|
||||
defer func() {
|
||||
self.c.Log.Infof(fmt.Sprintf("Refresh took %s", time.Since(t)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue