-
Notifications
You must be signed in to change notification settings - Fork 926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use of hardlinks to a symlinked toolchain is not portable on macOS #3136
Labels
Comments
brotskydotcom
added a commit
to brotskydotcom/rustup
that referenced
this issue
Jan 7, 2023
brotskydotcom
added a commit
to brotskydotcom/rustup
that referenced
this issue
Jan 7, 2023
brotskydotcom
added a commit
to brotskydotcom/rustup
that referenced
this issue
Jan 7, 2023
brotskydotcom
added a commit
to brotskydotcom/rustup
that referenced
this issue
Jan 7, 2023
brotskydotcom
added a commit
to brotskydotcom/rustup
that referenced
this issue
Jan 7, 2023
brotskydotcom
added a commit
to brotskydotcom/rustup
that referenced
this issue
Feb 23, 2023
Darunada
pushed a commit
to Darunada/rustup
that referenced
this issue
Feb 25, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
rustup always uses hard links to the rustup executable on file systems that allow it, even if the rustup "executable" is itself a symlink. On macOS, which supports both filesystems that allow hard links to symlinks and filesystems that don't, this creates a portability problem; for example, you can't always copy (or backup) a rust install from one volume to another.
Steps
On a Mac with both an HFS+ volume and an AFS volume:
brew rustup-init
.rustup-init
with a home directory on the AFS volume. This will result in hardlinks torustup
which is itself a symlink, as shown in this listing:Possible Solution(s)
While one option would be always to use symlinks on Mac, as is done on Android, that's a bigger change than needed, since arguably most rustup installs place an actual executable for
rustup
itself (and hard links to executables are supported on all macOS filesystems). The more cautious change is to detect whetherrustup
is a symlink and, if so, use a symlink to it rather than a hard link.Notes
No response
Rustup version
Installed toolchains
The text was updated successfully, but these errors were encountered: