Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
illicitonion committed Oct 23, 2023
1 parent 471d115 commit 3efd814
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions oci/private/tarball.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ if [[ "${FORMAT}" != "docker" && "${FORMAT}" != "oci" ]]; then
echo >&2 "Unknown format: ${FORMAT}. Only support docker|oci"
exit 1
fi
if [[ "${FORMAT}" == "oci" && "${MEDIA_TYPE}" != "application/vnd.oci.image.index.v1+json" ]]; then
echo >&2 "Format oci is only supported for image_index targets but saw ${MEDIA_TYPE}"
if [[ "${FORMAT}" == "oci" && "${MEDIA_TYPE}" != "application/vnd.oci.image.index.v1+json" && "${MEDIA_TYPE}" != "application/vnd.docker.distribution.manifest.v2+json" ]]; then
echo >&2 "Format oci is only supported for oci_image_index targets but saw ${MEDIA_TYPE}"
exit 1
fi
if [[ "${FORMAT}" == "docker" && "${MEDIA_TYPE}" != "application/vnd.oci.image.manifest.v1+json" && "${MEDIA_TYPE}" != "application/vnd.docker.distribution.manifest.v2+json" ]]; then
echo >&2 "Format docker is only supported for image targets but saw ${MEDIA_TYPE}"
echo >&2 "Format docker is only supported for oci_image targets but saw ${MEDIA_TYPE}"
exit 1
fi

Expand Down

0 comments on commit 3efd814

Please sign in to comment.