mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-06 05:54:28 -04:00
config: conditionally set default microserviceVersion
This commit is contained in:
parent
6f9d76dd6e
commit
b4ef4ec370
1 changed files with 3 additions and 1 deletions
|
@ -341,7 +341,9 @@ func New(fileHandler file.Handler, name string, force bool) (*Config, error) {
|
||||||
|
|
||||||
// Backwards compatibility: configs without the field `microserviceVersion` are valid in version 2.6.
|
// Backwards compatibility: configs without the field `microserviceVersion` are valid in version 2.6.
|
||||||
// In case the field is not set in an old config we prefil it with the default value.
|
// In case the field is not set in an old config we prefil it with the default value.
|
||||||
c.MicroserviceVersion = Default().MicroserviceVersion
|
if c.MicroserviceVersion == "" {
|
||||||
|
c.MicroserviceVersion = Default().MicroserviceVersion
|
||||||
|
}
|
||||||
|
|
||||||
return c, c.Validate(force)
|
return c, c.Validate(force)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue