fix ocis config parsing for subcommands

This commit is contained in:
Willy Kloucek
2022-05-02 13:13:29 +02:00
parent c878adbd8b
commit 18e9661a24
29 changed files with 223 additions and 71 deletions
+5 -4
View File
@@ -16,12 +16,13 @@ func GraphCommand(cfg *config.Config) *cli.Command {
Name: cfg.Graph.Service.Name,
Usage: subcommandDescription(cfg.Graph.Service.Name),
Category: "extensions",
Before: func(ctx *cli.Context) error {
err := parser.ParseConfig(cfg)
if err != nil {
Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err)
return err
}
return err
cfg.Graph.Commons = cfg.Commons
return nil
},
Subcommands: command.GetCommands(cfg.Graph),
}