mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-07 22:02:56 +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 {
|
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()
|
t := time.Now()
|
||||||
defer func() {
|
defer func() {
|
||||||
self.c.Log.Infof(fmt.Sprintf("Refresh took %s", time.Since(t)))
|
self.c.Log.Infof(fmt.Sprintf("Refresh took %s", time.Since(t)))
|
||||||
|
Reference in New Issue
Block a user