diff options
| author | Daniel J Walsh <dwalsh@redhat.com> | 2020-04-19 07:53:24 -0400 | 
|---|---|---|
| committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-04-21 05:18:16 -0400 | 
| commit | fc76fbf945d98e4d4203e3ce2aa7029a85c629b2 (patch) | |
| tree | 5b1ad12dc77fab202335e4ff3f7417c5e5de3707 /cmd/podman/images/inspect.go | |
| parent | 8884f6a4f357ea64ad5f20f791ec0a09bdd36352 (diff) | |
| download | podman-fc76fbf945d98e4d4203e3ce2aa7029a85c629b2.tar.gz podman-fc76fbf945d98e4d4203e3ce2aa7029a85c629b2.tar.bz2 podman-fc76fbf945d98e4d4203e3ce2aa7029a85c629b2.zip  | |
Fix podman inspect to return errors on failure
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/images/inspect.go')
| -rw-r--r-- | cmd/podman/images/inspect.go | 8 | 
1 files changed, 6 insertions, 2 deletions
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 {  | 
