From 40943586d2d56a746bf780b7529d13f59cbbb64b Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 31 Jan 2019 10:57:49 -0800 Subject: libpod/image: Use RepoDigests() in Inspect() To get the more-robust handling from 0f6535cf (libpod/image: Use ParseNormalizedNamed in RepoDigests, 2019-01-08, #2106) here too. Signed-off-by: W. Trevor King --- libpod/image/image.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libpod') diff --git a/libpod/image/image.go b/libpod/image/image.go index ea326d820..a32336f49 100644 --- a/libpod/image/image.go +++ b/libpod/image/image.go @@ -823,9 +823,9 @@ func (i *Image) Inspect(ctx context.Context) (*inspect.ImageData, error) { return nil, err } - var repoDigests []string - for _, name := range i.Names() { - repoDigests = append(repoDigests, strings.SplitN(name, ":", 2)[0]+"@"+i.Digest().String()) + repoDigests, err := i.RepoDigests() + if err != nil { + return nil, err } driver, err := i.DriverData() -- cgit v1.2.3-54-g00ecf