From f37c432bd5fc40ee45b5d31ea750c59c544f2df5 Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Sat, 23 Mar 2013 14:18:35 -0700 Subject: [PATCH] Fixed 'docker inspect' to exit silently when an image doesn't exist --- commands.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/commands.go b/commands.go index 0933171448..16f97f12dd 100644 --- a/commands.go +++ b/commands.go @@ -234,9 +234,7 @@ func (srv *Server) CmdInspect(stdin io.ReadCloser, stdout io.Writer, args ...str var obj interface{} if container := srv.runtime.Get(name); container != nil { obj = container - } else if image, err := srv.runtime.repositories.LookupImage(name); err != nil { - return err - } else if image != nil { + } else if image, err := srv.runtime.repositories.LookupImage(name); err == nil && image != nil { obj = image } else { // No output means the object does not exist