Repository navigation
Conversation
…Windows Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
npm startoutput on zh-CN Windows was full of mojibake (锟斤拷…). Every provider whose binary is not installed made the app shell out towhere, which prints a localized (GBK) "not found" message straight to the terminal even when stderr is piped, and Node'sutf-8decode irreversibly turned the GBK bytes intoU+FFFD.Root cause
src/main/providers/resolve-binary.tsranwhere "<binary>"viaexecSyncto resolve CLI binaries; on zh-CN Windows a missing binary prints信息: 用提供的模式无法找到文件。directly to the console and exits non-zero.src/main/prerequisites.ts(where claude).whereoutput is GBK (code page 936);encoding: 'utf-8'produced replacement chars that render as锟斤拷mojibake in the terminal.Fix
On Windows, replace the
wheresubprocess with a pure-Node walk of the augmented PATH (findBinaryInDir/fs.existsSync, checking.cmd/.exe/.ps1/bare) — no subprocess, no localized output, no encoding hazard. macOS/Linux still usewhich(no localization issue). The identical latent bug inprerequisites.tsis fixed the same way.Verification
npm run buildpasseswhereis never shelled out to on Windows🤖 Generated with Claude Code