Update kpod commands to use getConfig()
Make getStore() take a config struct from which it pulls the store options, then update the kpod commands so that they call getConfig() and pass the config into getStore() Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
This commit is contained in:
parent
0c8f106ee8
commit
a8b6f2ad8a
12 changed files with 55 additions and 32 deletions
|
@ -38,7 +38,7 @@ func validateConfig(config *server.Config) error {
|
|||
func mergeConfig(config *server.Config, ctx *cli.Context) error {
|
||||
// Don't parse the config if the user explicitly set it to "".
|
||||
if path := ctx.GlobalString("config"); path != "" {
|
||||
if err := config.FromFile(path); err != nil {
|
||||
if err := config.UpdateFromFile(path); err != nil {
|
||||
if ctx.GlobalIsSet("config") || !os.IsNotExist(err) {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue