Files
podman/docker/docker.in
Christoph Reiter 9c14d15f4c bin/docker: fix broken escaping and variable substitution
In #24034 more variables were added to the envsubst input, but there is no
escaping with envsubst, so the resulting bash script never used
XDG_CONFIG_HOME. Also it replaced HOME with the build time HOME env
var breaking the runtime subsitution, resulting in something bogus like:

[ -e "\${XDG_CONFIG_HOME-\/home/build/.config}/containers/nodocker" ]

Fix by telling envsubst to just replace BINDIR and ETCDIR and remove
the broken escaping in the envsubst input.

Signed-off-by: Christoph Reiter <reiter.christoph@gmail.com>
2024-12-07 15:21:51 +01:00

5 lines
239 B
Bash
Executable File

#!/bin/sh
[ -e ${ETCDIR}/containers/nodocker ] || [ -e "${XDG_CONFIG_HOME-$HOME/.config}/containers/nodocker" ] || \
echo "Emulate Docker CLI using podman. Create ${ETCDIR}/containers/nodocker to quiet msg." >&2
exec ${BINDIR}/podman "$@"