From 2b9e314382f5b76f3b1e40985cc91de39e5a6744 Mon Sep 17 00:00:00 2001 From: tecnolgd Date: Mon, 12 Oct 2026 14:10:33 +0000 Subject: [PATCH] fix(format-rust): use null-delimited git ls-files to prevent quote decoding errors Signed-off-by: tecnolgd --- tools/format-rust.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/format-rust.py b/tools/format-rust.py index 336c4ad3..455cad7d 100755 --- a/tools/format-rust.py +++ b/tools/format-rust.py @@ -17,14 +17,17 @@ def rust_files(): result = subprocess.run( - ["git", "ls-files", "*.rs"], + ["git", "ls-files", "-z", "*.rs"], cwd=ROOT, check=True, capture_output=True, - text=True, ) - for name in result.stdout.splitlines(): + for entry in result.stdout.split(b"\x00"): + if not entry: + continue; + + name = entry.decode("utf-8") path = ROOT / name if any(part in SKIP_DIRS for part in path.parts):