Skip to content

Commit

Permalink
Fix podman-docker.sh under -eu shells (fixes #23628)
Browse files Browse the repository at this point in the history
Signed-off-by: Georgi Chulkov <[email protected]>
  • Loading branch information
Gchbg committed Aug 15, 2024
1 parent f456b53 commit 004c040
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker/podman-docker.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# DOCKER_HOST initialization

if [ -z "$DOCKER_HOST" ]; then
if [ -z "${DOCKER_HOST-}" ]; then
if [ $(id -u) -eq 0 ]; then
export DOCKER_HOST=unix:///run/podman/podman.sock
else
if [ -n "$XDG_RUNTIME_DIR" ]; then
if [ -n "${XDG_RUNTIME_DIR-}" ]; then
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock
fi
fi
Expand Down

0 comments on commit 004c040

Please sign in to comment.