diff --git a/distrobox-export b/distrobox-export index 523f8ae6f5..076fb703c6 100755 --- a/distrobox-export +++ b/distrobox-export @@ -31,7 +31,8 @@ [ -z "${SHELL}" ] && SHELL="$(getent passwd "${USER}" | cut -d':' -f7)" # Defaults -container_name="${CONTAINER_ID:-$(grep "name=" /run/.containerenv | cut -d'=' -f2- | tr -d '"')}" +container_name="${CONTAINER_ID:-}" +[ -z "${container_name}" ] && container_name="$(grep "name=" /run/.containerenv | cut -d'=' -f2- | tr -d '"')" export_action="" exported_app="" exported_app_label=""