Skip to content

Commit 26710df

Browse files
feat: add doas support
Some people may have some reason to drop sudo and switch to doas
1 parent 0d0ea98 commit 26710df

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

install.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,8 @@ sh_c() {
531531
sudo_sh_c() {
532532
if [ "$(id -u)" = 0 ]; then
533533
sh_c "$@"
534+
elif command_exists doas; then
535+
sh_c "doas $*"
534536
elif command_exists sudo; then
535537
sh_c "sudo $*"
536538
elif command_exists su; then
@@ -539,7 +541,7 @@ sudo_sh_c() {
539541
echoh
540542
echoerr "This script needs to run the following command as root."
541543
echoerr " $*"
542-
echoerr "Please install sudo or su."
544+
echoerr "Please install doas, sudo or su."
543545
exit 1
544546
fi
545547
}

0 commit comments

Comments
 (0)