From: Felix Abecassis Date: Fri, 1 Dec 2017 06:51:57 +0000 (-0800) Subject: lxc-oci: support index files with multiple manifests X-Git-Tag: lxc-3.0.0.beta1~145^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0fd2b679727bfcff36b7e08d87ccfcca744aa602;p=thirdparty%2Flxc.git lxc-oci: support index files with multiple manifests Previously, the output would contain "null" strings in this case. Signed-off-by: Felix Abecassis --- diff --git a/templates/lxc-oci.in b/templates/lxc-oci.in index b3a65e9a1..6689f053c 100755 --- a/templates/lxc-oci.in +++ b/templates/lxc-oci.in @@ -63,7 +63,7 @@ getconfigpath() { basedir="$1" q="$2" - digest=`cat "${basedir}/index.json" | jq -c -r --arg q "$q" '.manifests[] | if .annotations."org.opencontainers.image.ref.name" == $q then .digest else null end'` + digest=`cat "${basedir}/index.json" | jq -c -r --arg q "$q" '.manifests[] | if .annotations."org.opencontainers.image.ref.name" == $q then .digest else empty end'` if [ -z "${digest}" ]; then echo "$q not found in index.json" >&2 return