From ad542ebe0f7a1c8689ae475fc0a1481824daf3ad Mon Sep 17 00:00:00 2001 From: Osama Albahrani <54853250+osalbahr@users.noreply.github.com> Date: Thu, 1 Feb 2024 16:19:32 -0500 Subject: [PATCH] rm: Ignore nonexistent `~/.local/bin` (#1073) Fixes 89luca89/distrobox#1072 --- distrobox-rm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distrobox-rm b/distrobox-rm index 702c1dd408..2f4997159f 100755 --- a/distrobox-rm +++ b/distrobox-rm @@ -308,7 +308,7 @@ delete_container() { IFS='@' # Remove exported binaries from this container in default path - binary_files="$(grep -rl "# distrobox_binary" "${HOME}/.local/bin" | + binary_files="$(grep -rl "# distrobox_binary" "${HOME}/.local/bin" 2> /dev/null | xargs -I{} grep -le "# name: ${container_name}$" "{}" | xargs -I{} printf "%s@" {} 2> /dev/null || :)" for file in ${binary_files}; do