mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-10-18 20:07:33 +00:00
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
1 changed files with 6 additions and 2 deletions
|
|
@ -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…
Add table
Reference in a new issue