From d0db8d97813dd29f4deb1a1d34c62cd94b8a37a6 Mon Sep 17 00:00:00 2001 From: Luca Di Maio Date: Sun, 17 Sep 2023 08:36:59 +0200 Subject: [PATCH] init: better detect package existence on Apt based systems Signed-off-by: Luca Di Maio --- distrobox-init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distrobox-init b/distrobox-init index 66cb5795fa..b1a3fa3895 100755 --- a/distrobox-init +++ b/distrobox-init @@ -577,7 +577,7 @@ if [ "${upgrade}" -ne 0 ] || " install_pkg="" for dep in ${deps}; do - if apt-cache show "${dep}" > /dev/null; then + if apt-cache show "${dep}" | grep -q Package; then install_pkg="${install_pkg} ${dep}" fi done