mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03: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:
@ -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)))
|
||||
|
Reference in New Issue
Block a user