Fix file permission bug in init --reference#92
Merged
mobileoverlord merged 1 commit intomainfrom Feb 25, 2026
Merged
Conversation
The file_modes lookup in download_reference_contents used item.path (full GitHub API path with references/<name>/ prefix) but file_modes keys are relative (prefix already stripped by fetch_file_modes). This mismatch meant the lookup never matched, so executable scripts like rubicon-usb-gadget-setup got 644 instead of 755, causing boot failures. Fix: use relative_path (which has the prefix stripped) for the lookup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
03075e5 to
5aa85ce
Compare
mobileoverlord
approved these changes
Feb 25, 2026
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
avocado init --referencedownloads files from GitHub but never set the execute bit on scripts (e.g.,rubicon-usb-gadget-setupgot 644 instead of 755), causing boot failuresfile_modeskeys are relative paths (stripped ofreferences/<name>/prefix), but the lookup useditem.pathwhich retains the full GitHub API path — so the lookup never matchedrelative_pathinstead ofitem.pathfor thefile_modeslookup (one-line change)Test plan
test_file_modes_lookup_uses_relative_pathproving the fix works and the old code was brokenavocado init --reference rubiconnow setsrubicon-usb-gadget-setupto 755🤖 Generated with Claude Code