Closed watzon closed 1 year ago
Installing sudo
with scoop and then doing sudo shards install
works, but obviously it would be good to avoid giving admin rights to a program that can execute arbitrary code.
@watzon Looking at Crystal's code (here) seems that it uses the expected unprivileged flag (from Windows docs)
if not mistaken, that might be due Developer Mode needs to be turned on at least once for symlinks to work: https://docs.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development
Are you able to test enabling developer mode without having to do sudo
or an Administrator prompt?
I think this issue needs some attention in order to improve the user experience on Windows.
Enabling developer mode allows creating symlinks.
So the very least we can do is catch the symlink error and display a helpful message that recommends enabling developer mode (or admin rights alternatively). We can even check if developer mode is enabled (Go implementation).
It would be ideal if it worked out of the box without developer mode. But I don't think there is a viable path for that. git
also requires developer mode to checkout symlinks on Windows.
Stumbled on this today while trying to install shards for a project. Fresh git clone. Seems like Windows requires some funky permissions for symlinking and it's not possible to do without some admin rights. The full error is as follows: