mirror of
https://github.com/containers/podman.git
synced 2026-02-05 06:45:31 +01:00
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>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
[ -e ${ETCDIR}/containers/nodocker ] || [ -e "\${XDG_CONFIG_HOME-\$HOME/.config}/containers/nodocker" ] || \
|
||||
[ -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 "$@"
|
||||
|
||||
Reference in New Issue
Block a user