summaryrefslogtreecommitdiff
path: root/cmd/podman/images/inspect.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/images/inspect.go')
-rw-r--r--cmd/podman/images/inspect.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/cmd/podman/images/inspect.go b/cmd/podman/images/inspect.go
index 11bef02ba..91c9445eb 100644
--- a/cmd/podman/images/inspect.go
+++ b/cmd/podman/images/inspect.go
@@ -2,7 +2,6 @@ package images
import (
"context"
- "encoding/json"
"fmt"
"os"
"strings"
@@ -84,10 +83,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 {