`rustup override` handles symlinks to directories poorly
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 22h 40m
- Merged PRs (30d)
- 46
Description
While in most other contexts, treating symlinks to directories as directories makes sense, I don't think it does in rustup override:
-
You can't
cdinto a symlink and then haverustuprecognize the override, even though the symlink is in$PATH. -
When using
rustup override list, symlinks to directories are shown as regular, and are not removed withrustup override unset --nonexistent. -
When using
rustup override unset --path the_symlink,rustupwill instead remove the override at the target of the symlink! If you set an override on a project, then rename the project and symlink the old location to the new directory, it's not possible viarustupto remove the old override - and trying to do so will actually remove the override for the new directory!
I feel like having either 1. or 2. working well would be alright, but 3. should probably be addressed regardless.
Thoughts?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the three reported cases with rustup override list, rustup override unset --nonexistent, and rustup override unset --path the_symlink. Trace the override path handling for symlinks to directories, with priority on preventing unset --path from removing the target directory's override. Done means the reported symlink behavior is corrected and covered by appropriate tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100