Skip to content

fix(pre-commit-hook): same UnicodeDecodeError encoding bug as ownership_engine.py - #217

Merged
Wolfvin merged 1 commit into
mainfrom
fix/ownership-encoding-crash
Jul 12, 2026
Merged

fix(pre-commit-hook): same UnicodeDecodeError encoding bug as ownership_engine.py#217
Wolfvin merged 1 commit into
mainfrom
fix/ownership-encoding-crash

Conversation

@Wolfvin

@Wolfvin Wolfvin commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Follow-up to PR #216 — systematic grep for the same bug class (subprocess.run(text=True) without explicit encoding) across the whole scripts/ directory found 2 more occurrences in pre_commit_hook.py: the git diff --cached --name-only call and the codelens check subprocess invocation. Both would crash on non-cp1252 output (accented filenames, non-ASCII finding text) same as the ownership crash fixed in #216.

Fix: add encoding='utf-8', errors='replace' to both calls.

@Wolfvin
Wolfvin merged commit 68b01d7 into main Jul 12, 2026
@Wolfvin
Wolfvin deleted the fix/ownership-encoding-crash branch July 12, 2026 02:42
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

…ip_engine.py (PR #216)

Systematic grep for the same bug class (subprocess.run text=True without
explicit encoding) found 2 more occurrences in pre_commit_hook.py — git
diff --name-only and the codelens check subprocess invocation, both would
crash on non-cp1252 output (accented filenames, non-ASCII finding text)
same as the ownership crash fixed in PR #216.

Fix: add encoding='utf-8', errors='replace' to both calls.
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant