align commands to always execute the original Before()
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -24,13 +24,13 @@ func ThumbnailsCommand(cfg *config.Config) *cli.Command {
|
||||
command.PrintVersion(cfg.Thumbnails),
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
thumbnailsCommand := command.Server(configureThumbnails(cfg))
|
||||
origCmd := command.Server(configureThumbnails(cfg))
|
||||
|
||||
if err := thumbnailsCommand.Before(c); err != nil {
|
||||
if err := origCmd.Before(c); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return cli.HandleAction(thumbnailsCommand.Action, c)
|
||||
return cli.HandleAction(origCmd.Action, c)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user