cmd/cli: do not validate if custom config is empty

Avoiding useless warnings when doing rules validation.
This commit is contained in:
Cuong Manh Le
2025-03-06 01:59:28 +07:00
committed by Cuong Manh Le
parent 1ad63827e1
commit b27064008e

View File

@@ -1839,6 +1839,12 @@ func doValidateCdRemoteConfig(cdUID string, fatal bool) error {
return err
}
}
// return earlier if there's no custom config.
if rc.Ctrld.CustomConfig == "" {
return nil
}
// validateCdRemoteConfig clobbers v, saving it here to restore later.
oldV := v
var cfgErr error