Signed-off-by: Paolo Bonzini <[email protected]>
---
 scripts/get-wraps-from-cargo-registry.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/get-wraps-from-cargo-registry.py 
b/scripts/get-wraps-from-cargo-registry.py
index 3820d121183..84c652127f9 100755
--- a/scripts/get-wraps-from-cargo-registry.py
+++ b/scripts/get-wraps-from-cargo-registry.py
@@ -59,8 +59,10 @@ def compare_build_rs(self, orig_dir: str, registry_namever: 
str) -> None:
             if os.path.isfile(new_build_rs):
                 msg = f"build.rs added in {registry_namever}"
 
-        elif os.path.isfile(orig_build_rs) and not filecmp.cmp(orig_build_rs, 
new_build_rs):
+        elif os.path.isfile(orig_build_rs) and not filecmp.cmp(orig_build_rs, 
new_build_rs, shallow=False):
             msg = f"build.rs changed from {orig_dir} to {registry_namever}"
+            # diff exits non-zero when the files differ, which is expected here
+            subprocess.run(["diff", "-u", orig_build_rs, new_build_rs])
 
         if msg:
             print(f"⚠️  Warning: {msg}")
-- 
2.55.0


Reply via email to