diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index b39433f3..47b3001d 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -232,6 +232,8 @@ run_pacman() { cmd=("$PACMAN_PATH" "${PACMAN_OPTS[@]}" "$@") if type -p sudo >/dev/null; then cmd=(sudo "${cmd[@]}") + elif type -p doas >/dev/null; then + cmd=(doas "${cmd[@]}") else cmd=(su root -c "$(printf '%q ' "${cmd[@]}")") fi -- 2.30.1 From 2a455f2adc1bc87ed6b1d23261c8f911a7cc066b Mon Sep 17 00:00:00 2001 From: Erich Ericson Date: Sun, 21 Feb 2021 17:35:26 +0100 Subject: [PATCH] add prompting support for doas binary Signed-off-by: Erich Ericson --- scripts/libmakepkg/executable/sudo.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/libmakepkg/executable/sudo.sh.in b/scripts/libmakepkg/executable/sudo.sh.in index 9e50a76b..4d701946 100644 --- a/scripts/libmakepkg/executable/sudo.sh.in +++ b/scripts/libmakepkg/executable/sudo.sh.in @@ -29,8 +29,8 @@ executable_functions+=('executable_sudo') executable_sudo() { if (( DEP_BIN || RMDEPS || INSTALL )); then - if ! type -p sudo >/dev/null; then - warning "$(gettext "Cannot find the %s binary. Will use %s to acquire root privileges.")" "sudo" "su" + if ! type -p sudo >/dev/null || ! type -p doas >/dev/null; then + warning "$(gettext "Cannot find neither the %s nor %s binary. Will use %s to acquire root privileges.")" "sudo" "doas" "su" fi