Skip to content

Commit

Permalink
Check dependencies to avoid a useless sudo on Archlinux (Chia-Network…
Browse files Browse the repository at this point in the history
  • Loading branch information
Ealrann authored Jan 12, 2024
1 parent 17206ee commit c05fd88
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit c05fd88

Please sign in to comment.