Add verification to omarchy-pkg-add and speed up installs

This commit is contained in:
Ryan Hughes
2025-10-06 00:26:29 -04:00
parent 48004cf741
commit 35c3a38074

View File

@@ -1,8 +1,12 @@
#!/bin/bash
sudo pacman -S --noconfirm --needed "$@" || exit 1
for pkg in "$@"; do
# Secondary check to handle states where pacman doesn't actually register an error
if ! pacman -Q "$pkg" &>/dev/null; then
sudo pacman -S --noconfirm "$pkg" || exit 1
echo -e "\033[31mError: Package '$pkg' did not install\033[0m" >&2
exit 1
fi
done