@@ -1269,7 +1269,7 @@ update_arch_mirrors() {
12691269 fi
12701270 return 0
12711271 fi
1272- if ! command -v reflector & > /dev/null; then
1272+ if ! command -v reflector & > /dev/null; then
12731273 print_message " Reflector not installed. Installing reflector..."
12741274 if ! distro_install " reflector" ; then
12751275 print_error " Reflector installation failed. Aborting mirror update."
@@ -1295,7 +1295,7 @@ update_pacman() {
12951295update_yay () {
12961296 announce_step " Updating AUR packages"
12971297 check_yay
1298- if execute_command " $AUR_HELPER -Sua --noconfirm" " Update AUR packages" ; then
1298+ if [ -n " $AUR_HELPER " ] && execute_command " $AUR_HELPER -Sua --noconfirm" " Update AUR packages" ; then
12991299 aur_updates+=(" AUR Packages: $CHECK_MARK " )
13001300 else
13011301 aur_updates+=(" AUR Packages: $CROSS_MARK " )
@@ -1306,11 +1306,20 @@ remove_cache() {
13061306 announce_step " Removing pacman cache"
13071307 check_yay
13081308 if [[ " $DISTRO " == " endeavouros" ]]; then
1309- execute_command " sudo paccache -r && sudo pacman -Sc --noconfirm && $AUR_HELPER -Sc --noconfirm" " Remove pacman/aur cache (EndeavourOS)"
1309+ execute_command " sudo paccache -r && sudo pacman -Sc --noconfirm" " Remove pacman cache (EndeavourOS)"
1310+ if [ -n " $AUR_HELPER " ]; then
1311+ execute_command " $AUR_HELPER -Sc --noconfirm" " Remove AUR cache (EndeavourOS)"
1312+ fi
13101313 elif [[ " $DISTRO " == " arch" ]] || [[ " $DISTRO " == " cachyos" ]]; then
1311- execute_command " sudo pacman -Sc --noconfirm && $AUR_HELPER -Sc --noconfirm" " Remove pacman/aur cache (Arch Linux/CachyOS)"
1314+ execute_command " sudo pacman -Sc --noconfirm" " Remove pacman cache (Arch Linux/CachyOS)"
1315+ if [ -n " $AUR_HELPER " ]; then
1316+ execute_command " $AUR_HELPER -Sc --noconfirm" " Remove AUR cache (Arch Linux/CachyOS)"
1317+ fi
13121318 else
1313- execute_command " sudo pacman -Sc --noconfirm && $AUR_HELPER -Sc --noconfirm" " Remove pacman/aur cache"
1319+ execute_command " sudo pacman -Sc --noconfirm" " Remove pacman cache"
1320+ if [ -n " $AUR_HELPER " ]; then
1321+ execute_command " $AUR_HELPER -Sc --noconfirm" " Remove AUR cache"
1322+ fi
13141323 fi
13151324 print_message " Pacman cache removed."
13161325}
0 commit comments