From 8e67e717a04085261632f1012ecdd1c013fcf5c3 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 9 Sep 2025 14:51:27 +0200 Subject: [PATCH] Onlt run updatedb if the install worked --- bin/omarchy-pkg-install | 6 ++++-- bin/omarchy-pkg-remove | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bin/omarchy-pkg-install b/bin/omarchy-pkg-install index 3691646..2be6650 100755 --- a/bin/omarchy-pkg-install +++ b/bin/omarchy-pkg-install @@ -16,7 +16,9 @@ pkg_names=$(pacman -Slq | fzf "${fzf_args[@]}") if [[ -n "$pkg_names" ]]; then # Convert newline-separated selections to space-separated for yay - echo "$pkg_names" | tr '\n' ' ' | xargs sudo pacman -S --noconfirm - sudo updatedb + if echo "$pkg_names" | tr '\n' ' ' | xargs sudo pacman -S --noconfirm; then + sudo updatedb + fi + omarchy-show-done fi diff --git a/bin/omarchy-pkg-remove b/bin/omarchy-pkg-remove index 5408aa9..e4ad87a 100755 --- a/bin/omarchy-pkg-remove +++ b/bin/omarchy-pkg-remove @@ -16,7 +16,9 @@ pkg_names=$(yay -Qqe | fzf "${fzf_args[@]}") if [[ -n "$pkg_names" ]]; then # Convert newline-separated selections to space-separated for yay - echo "$pkg_names" | tr '\n' ' ' | xargs sudo pacman -Rns --noconfirm - sudo updatedb + if echo "$pkg_names" | tr '\n' ' ' | xargs sudo pacman -Rns --noconfirm; then + sudo updatedb + fi + omarchy-show-done fi