Skip to content

Commit

Permalink
export: fix CONTAINER_ID fallback
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Di Maio <[email protected]>
  • Loading branch information
89luca89 committed Jun 28, 2024
1 parent dcad7dd commit df7414b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion distrobox-export
Original file line number Diff line number Diff line change
Expand Up @@ -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=""
Expand Down

0 comments on commit df7414b

Please sign in to comment.