mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-06 04:09:40 -06:00
normalize store
This commit is contained in:
@@ -73,11 +73,8 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
||||
// load all env variables relevant to the config in the current context.
|
||||
conf.LoadOSEnv(config.GetEnv(), false)
|
||||
|
||||
if err = cfg.UnmapEnv(conf); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
bindings := config.StructMappings(cfg)
|
||||
return ociscfg.BindEnv(conf, bindings)
|
||||
}
|
||||
|
||||
// SutureService allows for the store command to be embedded and supervised by a suture supervisor tree.
|
||||
|
||||
@@ -21,14 +21,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Name: "server",
|
||||
Usage: "Start integrated server",
|
||||
Before: func(ctx *cli.Context) error {
|
||||
|
||||
if err := ParseConfig(ctx, cfg); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
logger := NewLogger(cfg)
|
||||
logger.Debug().Str("service", "store").Msg("ignoring config file parsing when running supervised")
|
||||
return nil
|
||||
return ParseConfig(ctx, cfg)
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := NewLogger(cfg)
|
||||
|
||||
Reference in New Issue
Block a user