Fix Windows git commit ValueError: embedded null character.

Use git commit -F and strip NULs from argv/version strings (0.3.7).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
mihailkudravcev
2026-07-24 13:23:32 +03:00
parent dc8be1bd1a
commit 98cbb88461
6 changed files with 66 additions and 13 deletions
+2 -1
View File
@@ -9,7 +9,8 @@ _VERSION_FILE = Path(__file__).resolve().parent.parent / "VERSION"
def _read_version() -> str:
try:
return _VERSION_FILE.read_text(encoding="utf-8").strip()
text = _VERSION_FILE.read_text(encoding="utf-8-sig", errors="ignore")
return text.replace("\0", "").strip() or "0.0.0"
except OSError:
return "0.0.0"