Skip to content

Commit

Permalink
fix: support --noconfirm in pacman operations too
Browse files Browse the repository at this point in the history
  • Loading branch information
gamemaker1 committed Nov 29, 2023
1 parent bb63774 commit b15935a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions source/yeet
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,11 @@ function install_packages {
return 2
else
# Install it using pacman
require_root $PACMAN_BIN -S "$package"
if [[ -z "$NO_CONFIRM" ]]; then
require_root $PACMAN_BIN -S "$package"
else
require_root $PACMAN_BIN -S --noconfirm "$package"
fi
fi
else
# Else it is in AUR, build it
Expand Down Expand Up @@ -440,7 +444,7 @@ function install_packages {
# Check if there is a .pkg.tar.zst file
if [[ -n $(echo *.pkg.tar.zst) ]]; then
# If there is, install it
require_root $PACMAN_BIN -U *.pkg.tar.zst
require_root $PACMAN_BIN -U --noconfirm *.pkg.tar.zst
printg "==> Installed $package successfully"
return
else
Expand Down

0 comments on commit b15935a

Please sign in to comment.