Retry on apk add failure

This commit is contained in:
Taiki Endo
2024-08-12 04:26:20 +09:00
parent 8efaa9bb37
commit 1f2c038e5d

View File

@@ -367,11 +367,11 @@ pacman_install() {
} }
apk_install() { apk_install() {
if type -P sudo &>/dev/null; then if type -P sudo &>/dev/null; then
sudo apk --no-cache add "$@" retry sudo apk --no-cache add "$@"
elif type -P doas &>/dev/null; then elif type -P doas &>/dev/null; then
doas apk --no-cache add "$@" retry doas apk --no-cache add "$@"
else else
apk --no-cache add "$@" retry apk --no-cache add "$@"
fi fi
} }
sys_install() { sys_install() {