Closed Timmmm closed 3 years ago
The sudo permission is required depending on where dart is installed. Under linux if you use the apt package installer then dart gets installed into /usr/bin which does require sudo.
I suspect on the mac there may be some install paths that do require sudo access as well.
So there are a couple of options. 1) do a better job in making the user aware that we are going to ask for the sudo password. 2) do better checks to see if sudo is required. 3) force the user to start the install with sudo so we remove the confusion.
Thoughts?
Yeah I would try and detect if the destination directory is writable but the current user, and if not then print a message Running: sudo ln ... \nPlease enter your password
or something like that.
An alternative is just to run the command and grep for Permission denied
or whatever it says in the output, but that seems more fragile and janky.
These changes are in the latest release.
We now do additional checks on whether sudo is required. When we prompt for sudo we make it more obvious.
If you have further problems on this issue please feel free to re-open the issue.
When you do
dcli install
on Mac it randomly asks you for a password (there should at least be a prompt to tell you which password and why it needs it). If you cancel it then it turns out it is running a command assudo
that definitely doesn't need to be sudo:To Reproduce Follow the installation instructions on Mac.
Logs
Run dcli doctor: From the cli run
dcli doctor