-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
[BUG] ZVM on windows fails to make a symlink on windows for non-admin users #79
Comments
Okay, thanks Tim. Could you re-run the commands you've been trying with ZVM_DEBUG=1 as an environment variable? It should give us more info. |
I noticed this in go's stdlib for creation of symbolic links: https://cs.opensource.google/go/go/+/refs/tags/go1.23.6:src/os/file_windows.go;l=339 It appears you need Windows 10 1703 or higher in developer mode to create symlinks without administrator: https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10/ zvm could detect the situation, but then it isn't obvious what to do...Administrator escalation might be ok. Perhaps zvm needs an option to copy rather than symlink? |
In general, the symlink situation on Windows is often not worth it for most devs, as most users will now need Developer Mode and UAC elevation to make a symlink. Other tool-chains that use linking to avoid copies, such as Since There's a brief table of Windows' link types at https://ss64.com/nt/mklink.html |
I believe ZVM already escalates itself to administrator to create the necessary links. I'm just leaving for a week long trip today so I won't be able to engage much with this issue until next week. I'm interested any solution that is more reliable. |
On Windows, escalating to administrator requires a UAC prompt even for administrator users (since you should not turn off the prompt), and will not work for any users who do not have permissions or are unable to access an administrator in a timely fashion (e.g. for a large corporate or university network). This means that symlinks, while technically a cleaner and nicer option even on Windows, is not robust and cannot install while unattended. Switching to hard links as the default on Windows would mean no escalation is required, while the current behaviour could be preserved behind a switch. The established default behaviour is typically hard link on Windows/Linux and |
Describe the bug
ZVM is asking for administrative privileges to create a link on windows between an installed version and the common
~/.zvm/bin
folder.As both of these locations are within the users home folder (
C:\users\USERNAME
) these should not be required.While Administrative privileges are available for personal computers, this is not always an option if your computer is managed by a company.
To Reproduce
Steps to reproduce the behavior:
zvm use ...
Expected behavior
Link from
~/.zvm/VERSION
is created to~/.zvm/bin
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Configuration:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: