From d0e9d1c4c4d93a6f8c491e467de46158d2055bc7 Mon Sep 17 00:00:00 2001 From: Luca Di Maio Date: Mon, 11 Mar 2024 13:41:53 +0100 Subject: [PATCH] rm: do not fail if no exports are found, Fix #1262 Signed-off-by: Luca Di Maio --- distrobox-rm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distrobox-rm b/distrobox-rm index b6b98ce709..cf22a3e91a 100755 --- a/distrobox-rm +++ b/distrobox-rm @@ -376,13 +376,13 @@ cleanup_exports() { bin="$(echo "${i}" | cut -d'|' -f1 | sed 's/[ ]*$//' | sed 's/^[ ]*//')" dir="$(echo "${i}" | cut -d'|' -f2- | sed 's/[ ]*$//' | sed 's/^[ ]*//')" # shellcheck disable=SC2086,2248 - "$(dirname "$(realpath "${0}")")/distrobox-enter" ${distrobox_flags} "${container_name}" -- distrobox-export --bin "${bin}" --export-path "$(dirname "${dir}")" --delete + "$(dirname "$(realpath "${0}")")/distrobox-enter" ${distrobox_flags} "${container_name}" -- distrobox-export --bin "${bin}" --export-path "$(dirname "${dir}")" --delete || : done unset IFS # Remove exported gui apps from this container in default path # shellcheck disable=SC2086,2248 - "$(dirname "$(realpath "${0}")")/distrobox-enter" ${distrobox_flags} "${container_name}" -- sh -c "distrobox-export --list-apps | cut -d'|' -f1 | sed 's/[ ]*$//' | xargs -I{} distrobox-export --app \"{}\" -d" + "$(dirname "$(realpath "${0}")")/distrobox-enter" ${distrobox_flags} "${container_name}" -- sh -c "distrobox-export --list-apps | cut -d'|' -f1 | sed 's/[ ]*$//' | xargs -I{} distrobox-export --app \"{}\" -d" || : }