diff --git a/components/engine/commands.go b/components/engine/commands.go index 78d24ad0a0..4b23204854 100644 --- a/components/engine/commands.go +++ b/components/engine/commands.go @@ -454,7 +454,7 @@ func (srv *Server) CmdImages(stdin io.ReadCloser, stdout io.Writer, args ...stri } } // Display images which aren't part of a - if nameFilter != "" { + if nameFilter == "" { for id, image := range allImages { if !*quiet { for idx, field := range []string{ @@ -470,6 +470,7 @@ func (srv *Server) CmdImages(stdin io.ReadCloser, stdout io.Writer, args ...stri w.Write([]byte("\t" + field)) } } + w.Write([]byte{'\n'}) } else { stdout.Write([]byte(image.Id + "\n")) }