Repository navigation
fix(desktop): keep the rustcode on PATH at the app's version - #3486
Merged
Merged
Conversation
Adds 'rustcode server link-path' and a 'Use this app's version in a terminal' action on the Machines page. It points the rustcode a shell finds at the engine that runs it (a symlink on macOS and Linux, a copy on Windows), leaves Homebrew's copy to brew upgrade, and refuses a development build. server status already names the mismatch with both paths.
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
rustcode server statusalready reported when therustcodeon PATH differs from the engine's version, with both paths (path-version-mismatch), and the Machines page already shows that warning. What was missing is a way to fix it in one step.rustcode server link-pathpoints therustcodea shell finds at the engine that runs it: a symlink on macOS and Linux (the next app update reaches it too), a copy on Windows (a runningrustcode.exeis renamed aside first). The file is replaced in place through a staged sibling and a rename;PATHis never edited.brew upgrade lhagfoss/tap/rustcode(replacing its link would be undone bybrew), and refuses a development build.path-version-mismatch, a "Use this app's version in a terminal" button runs it with the app's bundled engine (newserver_link_pathcommand, same shape asserver_service_install) and reads the status again. The older~/.rustcode/bincopy from the install script is therefore named in the app and fixable there, not left ahead of the app's silently.docs/server.mddocumentslink-path.Changelog
The Machines page can point the
rustcodein a terminal at the app's version in one step (rustcode server link-path).Testing
cargo check --workspace --tests,cargo fmt --all -- --check,cargo test -p rustcode --lib -- service::path_binary(link plan and the replace-in-place step),cargo test -p rustcode-tui cli::tests.apps/desktop:bun run check;src-tauri:cargo fmt --check,cargo clippy --all-targets -- -D warnings.Closes #3411