From 85cb582f8675fb1aca2c156b1dbc41e8b12d58cf Mon Sep 17 00:00:00 2001 From: Miloslav Trmač Date: Sat, 28 Jul 2018 07:47:31 +0200 Subject: Fix the heuristic for docker-archive: sources in (podman pull) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of searching for "docker-archive" anywhere in the input, only accept it at the start, and require the colon separator as well. Signed-off-by: Miloslav Trmač Closes: #1176 Approved by: rhatdan --- cmd/podman/pull.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/podman/pull.go b/cmd/podman/pull.go index 431c1e0ed..d8fcf05c2 100644 --- a/cmd/podman/pull.go +++ b/cmd/podman/pull.go @@ -111,7 +111,7 @@ func pullCmd(c *cli.Context) error { } // Possible for docker-archive to have multiple tags, so use NewFromLoad instead - if strings.Contains(image, libpod.DockerArchive) { + if strings.HasPrefix(image, libpod.DockerArchive+":") { newImage, err := runtime.ImageRuntime().LoadFromArchive(getContext(), image, c.String("signature-policy"), writer) if err != nil { return errors.Wrapf(err, "error pulling image from %q", image) -- cgit v1.2.3-54-g00ecf