From bffc8f1faea868ca92054e05d0a2591b91a3fe4e Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 19 May 2026 21:33:12 +0200 Subject: [PATCH] Make more resilient --- bin/omarchy-pkg-drop | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/omarchy-pkg-drop b/bin/omarchy-pkg-drop index 0cbbfca6..24e9ed54 100755 --- a/bin/omarchy-pkg-drop +++ b/bin/omarchy-pkg-drop @@ -5,9 +5,14 @@ # omarchy:requires-sudo=true installed=() +declare -A seen=() for pkg in "$@"; do - if pacman -Q "$pkg" &>/dev/null; then - installed+=("$pkg") + if package_info=$(pacman -Q "$pkg" 2>/dev/null); then + package_name=${package_info%% *} + if [[ -z ${seen[$package_name]} ]]; then + installed+=("$package_name") + seen[$package_name]=1 + fi fi done