From fc76fbf945d98e4d4203e3ce2aa7029a85c629b2 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sun, 19 Apr 2020 07:53:24 -0400 Subject: Fix podman inspect to return errors on failure Signed-off-by: Daniel J Walsh --- cmd/podman/images/inspect.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cmd/podman') diff --git a/cmd/podman/images/inspect.go b/cmd/podman/images/inspect.go index 11bef02ba..3190ab725 100644 --- a/cmd/podman/images/inspect.go +++ b/cmd/podman/images/inspect.go @@ -84,10 +84,14 @@ func inspect(cmd *cobra.Command, args []string) error { } } + var lastErr error for id, e := range results.Errors { - fmt.Fprintf(os.Stderr, "%s: %s\n", id, e.Error()) + if lastErr != nil { + fmt.Fprintf(os.Stderr, "%s: %s\n", id, lastErr.Error()) + } + lastErr = e } - return nil + return lastErr } func inspectFormat(row string) string { -- cgit v1.2.3-54-g00ecf From 64f774866a37d2dc0d37d876d1bf3a96c4b04160 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mon, 20 Apr 2020 17:15:04 -0400 Subject: Need to set the Entrypoint Signed-off-by: Daniel J Walsh --- cmd/podman/common/specgen.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmd/podman') diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go index 1eb8fc0bd..4e2ce1e34 100644 --- a/cmd/podman/common/specgen.go +++ b/cmd/podman/common/specgen.go @@ -268,6 +268,8 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string var command []string + s.Entrypoint = entrypoint + // Build the command // If we have an entry point, it goes first if len(entrypoint) > 0 { -- cgit v1.2.3-54-g00ecf