Skip to content

Commit

Permalink
lxc-oci: fix Cmd/Entrypoint parsing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
flx42 committed Mar 29, 2018
1 parent 5b66b6e commit d99e3b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/lxc-oci.in
Expand Up @@ -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
Expand Down

0 comments on commit d99e3b2

Please sign in to comment.