fix yay updates

This commit is contained in:
2026-10-22 13:13:32 -06:00
parent 573f257e42
commit c5f06515a0
+7 -5
View File
@@ -4,8 +4,11 @@ echo "Updating AUR..."
YAY_FLAGS="--noconfirm --answerdiff=None --answeredit=None --answerclean=None" YAY_FLAGS="--noconfirm --answerdiff=None --answeredit=None --answerclean=None"
if ! yay -Sua $YAY_FLAGS 2>/dev/null; then # Only rebuild yay when yay itself is broken (e.g. a pacman upgrade bumped
echo "yay -Sua returned an error. Let's rebuild YAY." # libalpm). A failing AUR package is not fixed by a rebuild, so let that error
# show and fail the hook instead.
if ! yay --version &>/dev/null; then
echo "yay is broken (likely a libalpm bump). Rebuilding yay..."
sudo pacman -R --noconfirm yay sudo pacman -R --noconfirm yay
cd /tmp cd /tmp
rm -rf yay rm -rf yay
@@ -15,7 +18,6 @@ if ! yay -Sua $YAY_FLAGS 2>/dev/null; then
cd .. cd ..
rm -rf yay rm -rf yay
cd cd
yay -Sua $YAY_FLAGS
else
echo "AUR up to date."
fi fi
yay -Sua $YAY_FLAGS