Repository navigation
Replace a stale native Claude left by an old claude update (2.5.1) - #81
Merged
Merged
Conversation
~/.local/bin/claude comes first in PATH. A link left there by `claude update` was kept forever, so after image updates `claude` in the shell (and setup_ha_plugin's `claude plugin` calls) ran an old version: 2.1.38 on a real install, which rejects the bundled plugin's manifest. At startup, relink it to the image's Claude when it is older or broken and remove the old binary; a newer `claude update` is still kept. The version checks can't stop startup under set -e. 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.
Found while testing 2.5.0 on a real install (Raspberry Pi, aarch64).
The bug
~/.local/bincomes first inPATH.init_environmentonly created the~/.local/bin/claudelink when it was missing, and left any working link alone. So aclaude updaterun once inside the add-on pinned that version for good. On this install,claudein bash was 2.1.38 from February, while the image ships 2.1.316. That old version rejects the bundled plugin'splugin.json(Unrecognized keys: "$schema", "displayName"), soclaude plugin listshowed it as failed to load.setup_ha_plugin'sclaude plugincalls also ran the old binary.The panel's launch command calls
/usr/local/bin/claudedirectly, so sessions started from the panel were not affected: with 2.1.316 the plugin loads with no errors.The fix
relink_stale_native_claudepoints the link back at the image's Claude when the native copy is older or no longer runs, and removes the old ~250 MB binary fromversions/.claude updatenewer than the image is still kept.|| true, so a binary that won't run can't stop startup underset -e.Tests
tests/test-native-claude.sh(added torun-tests.sh) covers these cases:🤖 Generated with Claude Code