From d99e3b2ea72f99c8d8809cb6d774d1cdcc6e8dda Mon Sep 17 00:00:00 2001 From: Felix Abecassis Date: Thu, 29 Mar 2018 10:20:31 -0700 Subject: [PATCH] lxc-oci: fix Cmd/Entrypoint parsing Don't use the -r option of jq, since it will strip the double quotes. Fixes: #2195 Signed-off-by: Felix Abecassis --- templates/lxc-oci.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/lxc-oci.in b/templates/lxc-oci.in index d843a079e..4dca46ac0 100644 --- a/templates/lxc-oci.in +++ b/templates/lxc-oci.in @@ -100,8 +100,8 @@ getep() { configpath="$1" - ep=$(jq -c -r '.config.Entrypoint[]?'< "${configpath}") - cmd=$(jq -c -r '.config.Cmd[]?' < "${configpath}") + ep=$(jq -c '.config.Entrypoint[]?'< "${configpath}" | tr '\n' ' ') + cmd=$(jq -c '.config.Cmd[]?'< "${configpath}" | tr '\n' ' ') if [ -z "${ep}" ]; then ep="${cmd}" if [ -z "${ep}" ]; then