mirror of https://github.com/containers/podman.git
Fix podman inspect to return errors on failure
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
8884f6a4f3
commit
fc76fbf945
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue