Check dependencies to avoid a useless sudo on Archlinux (#17158)

This commit is contained in:
Aurélien Mora
2024-01-12 10:04:10 -06:00
committed by GitHub
parent 17206eea2e
commit c05fd88913
+3 -1
View File
@@ -210,7 +210,9 @@ elif [ "$(uname)" = "Linux" ]; then
echo "Installing on Arch Linux."
case $(uname -m) in
x86_64|aarch64)
sudo pacman ${PACMAN_AUTOMATED} -S --needed git openssl
if ! pacman -Qs "^git$" > /dev/null || ! pacman -Qs "^openssl$" > /dev/null ; then
sudo pacman ${PACMAN_AUTOMATED} -S --needed git openssl
fi
;;
*)
echo "Incompatible CPU architecture. Must be x86_64 or aarch64."