Repository navigation
fix(windows): preserve Unicode paths in terminal launch scripts - #1451
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 1
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
-
Check name Status Explanation Description check ✅ Passed The description clearly explains the bug, implementation, compatibility details, tests, limitations, and documentation impact. It is mostly complete despite omitting the template's Related Issues and … Title check ✅ Passed The title clearly and concisely identifies the Windows fix for preserving Unicode paths in terminal launch scripts. Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
- Fix all pre-merge checks with AI
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
…er/TerminalLauncherTests.cs
The cleanup commit in CoplayDev#1451 deleted the whole TerminalLauncherTests.cs instead of only the Unicode-path case the PR added. This brings back the 24 tests that existed before (including the CoplayDev#1279 stdin-redirect guard) and pairs the file with its .meta again.
Description
On Windows, the terminal launcher writes
mcp-terminal.cmdas UTF-8 but cmd reads it using the inherited console code page. With a Chinese project path and code page 936, the MCP server receives a mojibake--pidfilepath, creates a sibling directory with the corrupted name, and Unity cannot find the expected pidfile when stopping the server.Set code page 65001 before the script's command is read and explicitly write UTF-8 without a BOM. This preserves Unicode paths passed to the server.
Type of Change
Changes Made
chcp 65001 >nulon its own line before the Windows launch command.new UTF8Encoding(false).Compatibility / Package Source
beta.file:packages at version 9.7.1; the connected consumer project completed compilation and regenerated a script containing the UTF-8 setup.file:packages).Testing
TerminalLauncherTestsfixture, 26 passed, 0 failed, in an isolated minimal Unity project compiling the upstream launcher, interface, and test source.--pidfileargument before the fix and preserves it with the fix.git diff --check.The Windows regression tests execute cmd and perform actual filesystem writes; they do not launch an MCP server or an interactive terminal. No live server restart is claimed by this validation.
Documentation Updates
No tool/resource schemas or generated documentation change.
Summary by CodeRabbit