mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-13 09:06:27 -04: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
|
|
@ -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…
Reference in a new issue