Onlt run updatedb if the install worked

This commit is contained in:
David Heinemeier Hansson
2025-09-09 14:51:27 +02:00
parent d5ae9ffa05
commit 8e67e717a0
2 changed files with 8 additions and 4 deletions

View File

@@ -16,7 +16,9 @@ pkg_names=$(pacman -Slq | fzf "${fzf_args[@]}")
if [[ -n "$pkg_names" ]]; then if [[ -n "$pkg_names" ]]; then
# Convert newline-separated selections to space-separated for yay # Convert newline-separated selections to space-separated for yay
echo "$pkg_names" | tr '\n' ' ' | xargs sudo pacman -S --noconfirm if echo "$pkg_names" | tr '\n' ' ' | xargs sudo pacman -S --noconfirm; then
sudo updatedb sudo updatedb
fi
omarchy-show-done omarchy-show-done
fi fi

View File

@@ -16,7 +16,9 @@ pkg_names=$(yay -Qqe | fzf "${fzf_args[@]}")
if [[ -n "$pkg_names" ]]; then if [[ -n "$pkg_names" ]]; then
# Convert newline-separated selections to space-separated for yay # Convert newline-separated selections to space-separated for yay
echo "$pkg_names" | tr '\n' ' ' | xargs sudo pacman -Rns --noconfirm if echo "$pkg_names" | tr '\n' ' ' | xargs sudo pacman -Rns --noconfirm; then
sudo updatedb sudo updatedb
fi
omarchy-show-done omarchy-show-done
fi fi