Windows: fix pipx CCProxy fallback shim + binary resolution so clawde auth works - #15
Merged
Merged
Conversation
The Windows pipx fallback (used when the prebuilt ccproxy.exe ships without auth plugins) wired a broken shim and couldn't relocate the binary, so `clawde auth` failed with a missing-target shim and an aborting repair loop. Both stem from resolving the pipx binary via Get-Command / a fixed dir list instead of asking pipx. A shared Resolve-PipxCcproxy helper now queries `pipx environment --value PIPX_BIN_DIR`, checks the known pipx bin dirs (incl. %USERPROFILE%\.local\bin, the newer pipx default), and falls back to PATH last — while EXCLUDING the clawde bin dir so it can never return the about-to-be-deleted binary. - install.ps1 Install-CCProxyViaPipx: resolve the pipx target BEFORE deleting the plugin-less ccproxy.exe (previously it captured the bin-dir path, then deleted that exact file, leaving the shim pointing at nothing). - cli/clawde.ps1 Install-PluginCCProxy: use the same resolver so auth-time self-repair finds the pipx binary regardless of pipx's bin location. Closes #14 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.
Summary
Fixes the Windows
clawde authfailure (#14): when the plugin-less CCProxy binary triggers the pipx fallback, the tool wired a shim pointing at a deleted file and couldn't relocate the pipx binary during self-repair. Both stem from guessing where pipx installed ccproxy instead of asking pipx.What changed
A shared
Resolve-PipxCcproxyhelper (one copy per file — they don't share a module) now locates the pipx binary authoritatively:pipx environment --value PIPX_BIN_DIR.%USERPROFILE%\.local\bin(the newer pipx default that the old code missed — and the exact location the reported failure used).-Allso a valid pipx entry isn't hidden by the first match.Applied at both failure sites:
install.ps1): resolves the pipx target before deleting the plugin-less binary — the old code captured the bin-dir path, deleted that exact file, then pointed the shim at it.cli/clawde.ps1): uses the same resolver soclawde authself-repair finds the pipx binary regardless of pipx's bin location, and resolves-before-delete so a failed lookup leaves the diagnostic shim intact.Reviewer note
The plain diff for
install.ps1looks huge because the base blob has stale CRLF terminators while this branch is LF (per.gitattributeseol=crlf, which stores LF). The real change is ~117 lines — review withgit diff --ignore-cr-at-eol. The line-ending normalization of the existing blobs is a pre-existing repo hygiene matter, not part of this fix's logic.Note
These are pre-existing defects in the original pipx-fallback code, not a regression from a recent change.
Closes #14
🤖 Generated with Claude Code