Repository navigation
Windows tray: fall back past a broken managed CLI to Volta and PATH installs - #1753
Merged
Merged
Conversation
…nstalls The desktop app starts the tray with CODEBURN_BIN set to its own codeburn-cli.cmd launcher, which the tray took as final. When that launcher failed (#1750: exit 1, "The system cannot find the path specified"), the Volta install under a relocated VOLTA_HOME was never tried. The setup check now probes CODEBURN_BIN, every install the PATH and prefix search finds, then the recorded launcher, and keeps the first whose --version answers. When none does, the error lists each path with its own failure. Export and terminal actions use the probed CLI. The desktop app no longer overwrites a CODEBURN_BIN the person set themselves.
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 #1750.
When the desktop app starts the Windows tray it sets
CODEBURN_BINto its own launcher (%LOCALAPPDATA%\codeburn-menubar\codeburn-cli.cmd), and the tray'sresolve()treated anyCODEBURN_BINas final. If that launcher failed (in #1750 cmd.exe reported "The system cannot find the path specified"), the PATH search and theVOLTA_HOMElookup from #1534 never ran, so a Volta install underD:\Data\Volta\binwas never tried.cli_statusnow usesprobe(): triesCODEBURN_BIN, then every install found via PATH, Volta and npm (deduped), then the recorded launcher, and keeps the first whose--versionworks..setup-erroruseswhite-space: pre-line.CODEBURN_BINthe user set themselves.Tests: new Rust tests for candidate order, launcher missing or exiting 1 falling through, and all-failing listing every path; new vitest that a user
CODEBURN_BINis kept. Locally: cargo test 163 passed, app menubar tests 86 passed, full app vitest 1515 passed. The Windows-only code paths could not be compiled on macOS, so the Windows CI build is the real check.Follow-up, not in this PR: stderr from
.cmdchildren is decoded as UTF-8 and shows garbled on non-UTF-8 code pages.