diff --git a/script/setup_host_fedora.sh b/script/setup_host_fedora.sh index 7a1cfa7a0..46d240409 100755 --- a/script/setup_host_fedora.sh +++ b/script/setup_host_fedora.sh @@ -1,12 +1,11 @@ #!/bin/bash set -eux -o pipefail -DNF_OPTS="-y --setopt=install_weak_deps=False --setopt=tsflags=nodocs --exclude=kernel,kernel-core" -RPMS="bats git-core glibc-static golang jq libseccomp-devel make" +DNF=(dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs --exclude="kernel,kernel-core") +RPMS=(bats git-core glibc-static golang jq libseccomp-devel make) # Work around dnf mirror failures by retrying a few times. for i in $(seq 0 2); do sleep "$i" - # shellcheck disable=SC2086 - dnf $DNF_OPTS update && dnf $DNF_OPTS install $RPMS && break + "${DNF[@]}" update && "${DNF[@]}" install "${RPMS[@]}" && break done dnf clean all