Write a config file only if there is one specified

This commit is contained in:
mudler 2023-06-24 00:53:53 +02:00
parent d9a1fafffe
commit e103fa4a87

View file

@ -219,6 +219,8 @@ func InstallModel(basePath, nameOverride string, config *Config, configOverrides
return err
}
// write config file
if len(configOverrides) != 0 || len(config.ConfigFile) != 0 {
configFilePath := filepath.Join(basePath, name+".yaml")
// Read and update config file as map[string]interface{}
@ -246,6 +248,8 @@ func InstallModel(basePath, nameOverride string, config *Config, configOverrides
}
log.Debug().Msgf("Written config file %s", configFilePath)
}
return nil
}