Ask for sudo on the start
Is there some way to make it so it asks for the password at the start of the upgrade?
Because if you download many things it takes a while and sometimes I just want to do other stuff during that time, but sudo times out after 30 seconds. Or can I use some other method to achieve this?
nh os switch --ask or sudo nh os switch -R
I think the best solution would just be to send a notification. This was originally stated in this comment as to be done in #107 but that obviously never happened. Can this idea be revisited?
The notification should be triggered for long builds (e.g longer than 60s) and use some cross-platform crate that supports darwin
Not sure if you were actually asking for recommendations, or just jotting it down for future, but notify seems to fit the criteria.
Specifically mentions that it was originally targeted for darwin. I've used it in small personal projects and it works well.
PR's are welcome
Can you point me in the direction of the correct portion of the code base. I can take a look when I have time.
Would love this, especially as just sudo'ing it is unsupported
I also would love this :) a notification would be neat, since i personally have 0 xp with rust i think i would break it trying to do it ^^
This would be nice, I have been doing sudo echo ; nh os switch to get around this
I think I might be able to add a --notify flag (and NH_NOTIFY to set the flag via env) so that it sends notifications when
- Sudo password is prompted
- the switch command is done
Alternatively I can switch this into two environment variables (NH_SUDO_NOTIFY and NH_SWITCH_NOTIFY or similar), which would be both implied by the --notify flag. I understand that this issue is about notifications for sudo specifically, however, there might be more value in a fine-grained notification system in order to justify the dependency cost of something like the notify crate. Feedback is welcome, I'll try to submit a PR this evening for those willing to test.