Repository navigation
fix(install): resolve binaries with Bun.which so Windows stops reporting bun, git and claude missing - #2297
Open
Simonvm9114 wants to merge 1 commit into
Open
fix(install): resolve binaries with Bun.which so Windows stops reporting bun, git and claude missing#2297Simonvm9114 wants to merge 1 commit into
Simonvm9114 wants to merge 1 commit into
Conversation
…lmiessler#2295) On native Windows, DetectEnv reported bun, git and the harness binary as missing: detectTool() and detectHarness() ran `command -v` through execSync, which uses cmd.exe on win32, and cmd.exe has no `command` built-in. This happened even inside Claude Code's Bash tool and hooks. ClipSource's requireBinary() spawned `which`, which does not exist on Windows outside Git Bash, so it died on ENOENT with ffmpeg installed. - InstallEngine.ts (both shipped copies): new findBin() uses Bun.which, which is cross-platform and PATHEXT-aware (finds npm's claude.cmd). Outside bun it falls back to `where` on win32, `command -v` elsewhere. - ClipSource.ts: requireBinary() uses Bun.which. Verified on Windows 11, bun 1.4.2, from PowerShell and from Git Bash: DetectEnv now reports bun and git installed and the claude-code harness as "detected"; ClipSource passes its ffmpeg/ffprobe checks and stops at the (dummy) source file. The non-bun fallback resolves git via `where` under Node. macOS/Linux take the same Bun.which path; not run there. Co-Authored-By: Claude Opus 5.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.
Fixes #2295.
On native Windows,
DetectEnvreportedbun,gitand the harness binary as missing, andClipSourcedied on a missingwhichwith ffmpeg installed. Both looked binaries up the POSIX way:detectTool()anddetectHarness()rancommand -vthroughexecSync, which usescmd.exeon win32.cmd.exehas nocommandbuilt-in, so every probe failed, including inside Claude Code's Bash tool and hooks.ClipSource.requireBinary()spawnedwhich, which does not exist on Windows outside Git Bash.Change
Tools/InstallEngine.ts(and its shipped copy ininstall/skills/LifeOS/Tools/): a smallfindBin()resolves withBun.which, which is cross-platform and PATHEXT-aware (it finds npm'sclaude.cmd). The file only uses Node built-ins elsewhere, so outside bun it falls back towhereon win32 andcommand -von POSIX.detectTool()andhasBincall it; version probes are unchanged.install/LIFEOS/TOOLS/ClipSource.ts:requireBinary()usesBun.which.macOS and Linux take the same
Bun.whichpath. That is a behaviour change there only in mechanism, not in result; I have not run it on those platforms.Verification (Windows 11 Pro 10.0.26200, bun 1.4.2, Git for Windows 2.52.0, Claude Code 2.1.291 via npm, ffmpeg 8.0.1)
bun Tools/DetectEnv.tsfrom PowerShellbun/gitinstalled: false, harnessassumedinstalled: truewith versions and paths, harnessdetectedClipSource.ts <dummy> --start 0 --end 5from PowerShellExecutable not found in $PATH: "which"source file not founddetectTool("git", ...)under Node (noBunglobal)git.exeviawhereOut of scope, noted in the issue:
skills/Webdesign/Tools/VerifyDesign.ts:33andDriveClaudeDesign.ts:18use the same spawnedwhich, but outside Git Bash VerifyDesign fails earlier on a spawnedmkdir -p, so they need a broader look than this fix.🤖 Generated with Claude Code