From 51c940394f4834600ef50136a18adf14d9a9999c Mon Sep 17 00:00:00 2001 From: Shiming Zhang <wzshiming@foxmail.com> Date: Mon, 13 Sep 2021 19:19:00 +0800 Subject: [PATCH] Fix default mediaType --- scripts/diff-image.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/diff-image.sh b/scripts/diff-image.sh index da4a4fb..988dcc2 100755 --- a/scripts/diff-image.sh +++ b/scripts/diff-image.sh @@ -66,9 +66,9 @@ function inspect() { echo "${raw}" | jq -r '.fsLayers[].blobSum' ;; 2) - local mediaType=$(echo "${raw}" | jq -r '.mediaType') + local mediaType=$(echo "${raw}" | jq -r '.mediaType // "" ') case "${mediaType}" in - "application/vnd.docker.distribution.manifest.v2+json") + "application/vnd.docker.distribution.manifest.v2+json" | "") echo "${raw}" | jq -r '.layers[].digest' ;; "application/vnd.docker.distribution.manifest.list.v2+json")