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