From b4d75729d94840cef74f55bfab673ee084eaab4b Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 26 Jul 2025 15:53:53 -0400 Subject: [PATCH] Don't add the keys twice --- install/preflight/aur.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install/preflight/aur.sh b/install/preflight/aur.sh index eb62f1d..18659e3 100644 --- a/install/preflight/aur.sh +++ b/install/preflight/aur.sh @@ -3,7 +3,8 @@ # Only add Chaotic-AUR if the architecture is x86_64 so ARM users can build the packages if [[ "$(uname -m)" == "x86_64" ]] && ! command -v yay &>/dev/null; then # Try installing Chaotic-AUR keyring and mirrorlist - if sudo pacman-key --recv-key 3056513887B78AEB && + if ! pacman-key --list-keys 3056513887B78AEB >/dev/null 2>&1 && + sudo pacman-key --recv-key 3056513887B78AEB && sudo pacman-key --lsign-key 3056513887B78AEB && sudo pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' && sudo pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'; then @@ -33,4 +34,6 @@ if ! command -v yay &>/dev/null; then fi # Add fun and color to the pacman installer -sudo sed -i '/^\[options\]/a Color\nILoveCandy' /etc/pacman.conf +if ! grep -q "ILoveCandy" /etc/pacman.conf; then + sudo sed -i '/^\[options\]/a Color\nILoveCandy' /etc/pacman.conf +fi