Repository navigation
treat a missing binary dir as having no aliases on macos - #492
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #492 +/- ##
=======================================
Coverage 65.50% 65.50%
=======================================
Files 91 91
Lines 47030 47030
=======================================
Hits 30809 30809
Misses 16221 16221 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
|
Thank you! |
This was referenced Nov 6, 2026
|
This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this pull request. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
On macOS in user mode,
rig list,rig addand anything else that goes throughsc_get_list_details()failed with a bareNo such file or directory (os error 2)when~/.local/bindid not exist yet, which is the state of a fresh macOS account that has never installed R with rig.find_aliases()insrc/macos.rscalledread_dir()on the binary directory unconditionally; the Linux and Windows versions already return an empty list for a missing directory.This PR splits the directory lookup out of
find_aliases()intofind_aliases_in(&Path), which returns no aliases when the directory is missing, and adds two unit tests for it (missing directory, and a directory with one alias link plus one plain quick link). NEWS has an entry.Verified:
cargo build,cargo fmt --check,cargo test --bin rig(1117 passed, 11 ignored). With the fixed binary,HOME=$(mktemp -d) RIG_MODE=user rig listprints an empty list andrig add 4.3.999 --usergets as far as the version lookup, where before both failed immediately.Fixes #491.