Open kit-ty-kate opened 2 years ago
For the case where they're both found, let's "prefer" sudo
(on the basis that if it and doas
are present then sudo
was added explicitly and probably configured) but then display a warning that sudo
has been used and advise the required opam config
command to set the preference permanently between doas
and sudo
(cf. various git
things)
Alpine Linux officially started the migration from
sudo
todoas
in Alpine 3.15 (https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.15.0#Move_from_sudo_to_doas).It would be interesting to automatically use doas if it is present in place of sudo when sudo is not available (or if configured to do so). There doesn’t seem to be any automated way to detect if one or the other is configured so I’d say we should probably:
doas
is available butsudo
is not: usedoas
sudo
is available butdoas
is not: usesudo