|
@@ -156,6 +156,13 @@ def configoptions(ctx, dry_run: bool, file: Optional[str], hide_drift: bool) ->
|
|
|
invalid_options.add(key)
|
|
|
elif not_writable_reason == options.NotWritableReason.DRIFTED:
|
|
|
drifted_options.add(key)
|
|
|
+
|
|
|
+ opt = options.lookup_key(key)
|
|
|
+ if not opt.type.test(value):
|
|
|
+ invalid_options.add(key)
|
|
|
+ logger.error(
|
|
|
+ "Option %s has invalid type. got %s, expected %s.", key, type(value), opt.type
|
|
|
+ )
|
|
|
except options.UnknownOption:
|
|
|
invalid_options.add(key)
|
|
|
logger.error(
|
|
@@ -163,13 +170,6 @@ def configoptions(ctx, dry_run: bool, file: Optional[str], hide_drift: bool) ->
|
|
|
key,
|
|
|
)
|
|
|
|
|
|
- opt = options.lookup_key(key)
|
|
|
- if not opt.type.test(value):
|
|
|
- invalid_options.add(key)
|
|
|
- logger.error(
|
|
|
- "Option %s has invalid type. got %s, expected %s.", key, type(value), opt.type
|
|
|
- )
|
|
|
-
|
|
|
ctx.obj["invalid_options"] = invalid_options
|
|
|
ctx.obj["drifted_options"] = drifted_options
|
|
|
ctx.obj["hide_drift"] = hide_drift
|