mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00: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 {
|
||||
mainLog.Load().Error().Msgf("failed to unmarshal custom config: %v", err)
|
||||
}
|
||||
} else {
|
||||
setListenerDefaultValue(remoteCfg)
|
||||
setNetworkDefaultValue(remoteCfg)
|
||||
}
|
||||
cfgErr = validateConfig(remoteCfg)
|
||||
if cfgErr != nil {
|
||||
|
||||
Reference in New Issue
Block a user