-
Notifications
You must be signed in to change notification settings - Fork 893
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
Windows: Try using symlinks if they're allowed #3687
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems nice! Maybe add a comment to explain why we think symlinks are the better option here?
Something like that? |
This seems okay, going to merge this. Thanks! |
@ChrisDenton I don't use Windows personally but I have a question: will this create a possibly inconsistent state where one part of the installation is organized with symlinks and another part with juncture points? |
That could happen but I can't think of a case where the type of link would matter to us. Except, as previously mentioned, when moving the rustup directory. In that case you'll end up with some links being broken while others aren't but I'm not sure that's any worse than all links being broken. |
Windows requires Developer Mode to be enabled to use symlinks without admin permissions. This isn't always enabled, so fall back to using junction points if symlink creation fails. This is for example what rustup does already. See rust-lang/rustup#3687 for example.
Windows requires Developer Mode to be enabled to use symlinks without admin permissions. This isn't always enabled, so fall back to using junction points if symlink creation fails. This is for example what rustup does already. See rust-lang/rustup#3687 for example.
Windows requires Developer Mode to be enabled to use symlinks without admin permissions. This isn't always enabled, so fall back to using junction points if symlink creation fails. This is for example what rustup does already. See rust-lang/rustup#3687 for example.
On Windows, creating symlinks is not allowed unless developer mode is enabled or a specific permission is granted. Therefore this optimistically attempts to use symlinks first, before falling back to juncture points in the event that fails.
Resolves #3677