diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-01-23 11:05:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-23 11:05:09 +0100 |
commit | 1305f7c47a4c324c3afd873a244fe2315249a25d (patch) | |
tree | 765fe7f70fafbd075bd110ce399225d45fc04597 /libpod | |
parent | 474ba4c3acfc48fecb88814ba48f38e4da15ecae (diff) | |
parent | 6e6a38b4168ed7a528614f6499783243a8668395 (diff) | |
download | podman-1305f7c47a4c324c3afd873a244fe2315249a25d.tar.gz podman-1305f7c47a4c324c3afd873a244fe2315249a25d.tar.bz2 podman-1305f7c47a4c324c3afd873a244fe2315249a25d.zip |
Merge pull request #9067 from Luap99/podman-manifest-exists
podman manifest exists
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/image/manifests.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libpod/image/manifests.go b/libpod/image/manifests.go index 14f7c2f83..1ae3693c9 100644 --- a/libpod/image/manifests.go +++ b/libpod/image/manifests.go @@ -46,6 +46,15 @@ func (i *Image) InspectManifest() (*manifest.Schema2List, error) { return list.Docker(), nil } +// ExistsManifest checks if a manifest list exists +func (i *Image) ExistsManifest() (bool, error) { + _, err := i.getManifestList() + if err != nil { + return false, err + } + return true, nil +} + // RemoveManifest removes the given digest from the manifest list. func (i *Image) RemoveManifest(d digest.Digest) (string, error) { list, err := i.getManifestList() |