(feat) redirect pacman output and stop the build if pacman failed

This commit is contained in:
b1ek 2024-02-14 10:31:36 +10:00
parent 2948409f27
commit b7b536755c
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 7 additions and 1 deletions

View File

@ -167,7 +167,13 @@ if [ "${#PACDEPS[@]}" != "0" ]; then
inf "$TO_INSTALL" inf "$TO_INSTALL"
# welp lets install those # welp lets install those
sudo pacman -S --needed --noconfirm $TO_INSTALL sudo pacman -S --needed --noconfirm $TO_INSTALL &> $BRICKS_DB/.pacman-log
PACCODE="$?"
if ! [ "$PACCODE" == "0" ]; then
err "pacman exited with code $PACCODE"
err "pacman's output log is in $BRICKS_DB/.pacman-log"
exit
fi
inf "installed all pacman deps" inf "installed all pacman deps"
else else
inf "no pacman deps to install" inf "no pacman deps to install"