Only print line and key/value when a line number can be found (#15897)

This commit is contained in:
Josh Hawkins
2025-02-08 12:47:01 -06:00
committed by Blake Blackshear
parent ab8f9e5412
commit 283f1b19a7
+1
View File
@@ -84,6 +84,7 @@ def main() -> None:
except Exception as traverse_error: except Exception as traverse_error:
print(f"Could not determine exact line number: {traverse_error}") print(f"Could not determine exact line number: {traverse_error}")
if current != full_config:
print(f"Line # : {line_number}") print(f"Line # : {line_number}")
print(f"Key : {' -> '.join(map(str, error_path))}") print(f"Key : {' -> '.join(map(str, error_path))}")
print(f"Value : {error.get('input','-')}") print(f"Value : {error.get('input','-')}")