extract handleOriginalAction and check if Before() exists before calling it
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -20,12 +20,7 @@ func StorageFrontendCommand(cfg *config.Config) *cli.Command {
|
||||
Flags: flagset.FrontendWithConfig(cfg.Storage),
|
||||
Action: func(c *cli.Context) error {
|
||||
origCmd := command.Frontend(configureStorageFrontend(cfg))
|
||||
|
||||
if err := origCmd.Before(c); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return cli.HandleAction(origCmd.Action, c)
|
||||
return handleOriginalAction(c, origCmd)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user