refactor env unbinding to ocis-pkg

This commit is contained in:
A.Unger
2021-11-07 20:52:36 +01:00
parent 3206b98359
commit 6f27c1a100
6 changed files with 72 additions and 58 deletions

View File

@@ -72,12 +72,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.UnbindEnv(conf, bindings)
}
// SutureService allows for the proxy command to be embedded and supervised by a suture supervisor tree.