Allow using doas in place of sudo.

doas is much smaller and is used by some distributions, such as
Alpine, instead of sudo.
This commit is contained in:
Shea Levy 2024-02-27 17:08:52 -05:00 committed by mergify[bot]
parent 3572a7c47e
commit 31c945ed58

View File

@ -317,6 +317,7 @@ is_installer=\$(if [[ "\$is_nixos" == "y" ]] && grep -q VARIANT_ID=installer /et
is_container=\$(if [[ "\$(has systemd-detect-virt)" == "y" ]]; then systemd-detect-virt --container; else echo "none"; fi)
has_tar=\$(has tar)
has_sudo=\$(has sudo)
has_doas=\$(has doas)
has_wget=\$(has wget)
has_curl=\$(has curl)
has_setsid=\$(has setsid)
@ -348,6 +349,8 @@ fi
maybe_sudo=""
if [[ ${has_sudo-n} == "y" ]]; then
maybe_sudo="sudo"
elif [[ ${has_doas-n} == "y" ]]; then
maybe_sudo="doas"
fi
if [[ ${is_os-n} != "Linux" ]]; then