Open Crocmagnon opened 1 year ago
Or if it becomes hard to keep track of which commands might need password/user prompts, let the users define the priority commands
priority = ["system", "commands", "tlmgr", "cargo", "tldr"]
Yes, I guess that would also solve the issue in a nice and easier way 👍🏻
Hi @ConfusedSky, have you tried the pre_sudo
option? This seems to be able to resolve this issue:
[misc]
pre_sudo = true
Once enabled, topgrade
will execute sudo -v
before updating other tools to cache the sudo credential.
$ topgrade
── 17:33:54 - Sudo ─────────────────────────────────────────────────────────────
# So that you don't need to input password for tools that require `sudo`
I want to suggest some general feature
Topgrade should run the steps requiring passwords at the beginning, so that users can leave an upgrade mostly unattended after it has started.
For example on macOS :
tlmgr
requires the root password and in my system it is typically run in the middle of the process:More information
Test process:
Same goes for all steps requiring a password.