fix dead code logic

This commit is contained in:
A.Unger
2021-11-04 14:19:41 +01:00
parent cfe1ac30af
commit a76ad08d12
2 changed files with 16 additions and 14 deletions

View File

@@ -22,15 +22,15 @@ func Server(cfg *config.Config) *cli.Command {
Usage: "Start integrated server",
Flags: flagset.ServerWithConfig(cfg),
Before: func(ctx *cli.Context) error {
logger := NewLogger(cfg)
if cfg.HTTP.Root != "/" {
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
}
// When running on single binary mode the before hook from the root command won't get called. We manually
// call this before hook from ocis command, so the configuration can be loaded.
return ParseConfig(ctx, cfg)
logger.Debug().Str("service", "graph").Msg("ignoring config file parsing when running supervised")
if err := ParseConfig(ctx, cfg); err != nil {
return err
}
return nil
},
Action: func(c *cli.Context) error {