mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-04 01:07:49 +02:00
cmd/cli: set default value for remote config before validating
Since empty network will now have a default value, we need to set it after sytax validation, prevent false positive when validating rules.
This commit is contained in:
committed by
Cuong Manh Le
parent
020b814402
commit
20e61550c2
@@ -1866,6 +1866,9 @@ func doValidateCdRemoteConfig(cdUID string, fatal bool) error {
|
|||||||
} else {
|
} else {
|
||||||
mainLog.Load().Error().Msgf("failed to unmarshal custom config: %v", err)
|
mainLog.Load().Error().Msgf("failed to unmarshal custom config: %v", err)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
setListenerDefaultValue(remoteCfg)
|
||||||
|
setNetworkDefaultValue(remoteCfg)
|
||||||
}
|
}
|
||||||
cfgErr = validateConfig(remoteCfg)
|
cfgErr = validateConfig(remoteCfg)
|
||||||
if cfgErr != nil {
|
if cfgErr != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user