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 <fabecassis@nvidia.com>
This commit is contained in:
Felix Abecassis 2018-03-29 10:20:31 -07:00
parent 5b66b6ee3e
commit d99e3b2ea7

View File

@ -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