mirror of
https://github.com/taiki-e/install-action.git
synced 2026-05-09 22:30:28 +00:00
apk_install: Check sudo first
This commit is contained in:
4
main.sh
4
main.sh
@@ -289,7 +289,9 @@ snap_install() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
apk_install() {
|
apk_install() {
|
||||||
if type -P doas &>/dev/null; then
|
if type -P sudo &>/dev/null; then
|
||||||
|
sudo apk --no-cache add "$@"
|
||||||
|
elif type -P doas &>/dev/null; then
|
||||||
doas apk --no-cache add "$@"
|
doas apk --no-cache add "$@"
|
||||||
else
|
else
|
||||||
apk --no-cache add "$@"
|
apk --no-cache add "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user