Nothing worked, and nothing said so
说明与用途
协调器项目现在在 macOS 和 Windows 上均能正常运行:通过设置 PYTHONUTF8=1 解决编码问题,并采用 monorepo 结构防止冲突。
问题
On Windows the coordinator project’s hooks performed no action and produced no error messages, preventing repository synchronization.
结果
The coordinator project now runs identically on macOS and Windows, with hooks producing output, repositories synchronizing via git, and a monorepo structure preventing conflicts.
工作流
- 1. Install Python 3.12 and Git for Windows via winget. 2. Add python3.exe to PATH to match Microsoft Store shortcut. 3. Set environment variable PYTHONUTF8=1 to enable UTF‑8 encoding. 4. Verify hooks now produce output and commit changes. 5. Merge session indices using git merge=union. 6. Refactor project into a monorepo with 11 projects, 4 products, and shared configuration. 7. Commit and push from both machines, ensuring numbering ranges and relative paths remain consistent.
证据
With winget I installed Python 3.12 and Git for Windows, and added a python3.exe copy to cover the Microsoft Store shortcut.
Windows prints with cp1252, which doesn't have the arrow →, and my hooks used it.
The fix was an environment variable, PYTHONUTF8=1, which is still in my global configuration today.
The session index had 250 rows for 126 files; instead of regenerating it, I let git merge the two versions line by line with merge=union.
- 记录日期: 2026-10-07T23:41:13.048Z