Skip to content

Commit 301e988

Browse files
Print difference in validation of minimum versions
1 parent 9cd2d5c commit 301e988

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/validate_min_versions_in_sync.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"""
1515
from __future__ import annotations
1616

17+
import difflib
1718
import pathlib
1819
import sys
1920

@@ -73,6 +74,11 @@ def pin_min_versions_to_ci_deps() -> int:
7374
yaml_map, toml_map, yaml_start_data
7475
)
7576
if yaml_result_data != yaml_start_data:
77+
sys.stderr.write(difflib.unified_diff(
78+
yaml_start_data,
79+
yaml_result_data,
80+
fromfile=curr_file,
81+
tofile="edited"))
7682
with open(curr_file, "w", encoding="utf-8") as f:
7783
f.write(yaml_result_data)
7884
ret |= 1

0 commit comments

Comments
 (0)