mirror of
https://github.com/containers/podman.git
synced 2025-06-22 09:58:10 +08:00
Remove 'inspecting object' from inspect errors
This is just useless noise and gets us closer to what Docker returns. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -185,16 +185,16 @@ func (i *inspector) inspect(namesOrIDs []string) error {
|
||||
err = rpt.Execute(data)
|
||||
}
|
||||
if err != nil {
|
||||
errs = append(errs, fmt.Errorf("printing inspect output: %w", err))
|
||||
errs = append(errs, err)
|
||||
}
|
||||
|
||||
if len(errs) > 0 {
|
||||
if len(errs) > 1 {
|
||||
for _, err := range errs[1:] {
|
||||
fmt.Fprintf(os.Stderr, "error inspecting object: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "%v\n", err)
|
||||
}
|
||||
}
|
||||
return fmt.Errorf("inspecting object: %w", errs[0])
|
||||
return errs[0]
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ EOF
|
||||
|
||||
run_podman kube down $PODMAN_TMPDIR/test.yaml
|
||||
run_podman 125 inspect test_pod-test
|
||||
is "$output" ".*Error: inspecting object: no such object: \"test_pod-test\""
|
||||
is "$output" ".*Error: no such object: \"test_pod-test\""
|
||||
run_podman pod rm -a
|
||||
run_podman rm -a
|
||||
}
|
||||
@ -454,7 +454,7 @@ _EOF
|
||||
|
||||
run_podman kube down $PODMAN_TMPDIR/test.yaml
|
||||
run_podman 125 inspect test_pod-test
|
||||
is "$output" ".*Error: inspecting object: no such object: \"test_pod-test\""
|
||||
is "$output" ".*Error: no such object: \"test_pod-test\""
|
||||
run_podman pod rm -a
|
||||
run_podman rm -a
|
||||
}
|
||||
@ -477,7 +477,7 @@ _EOF
|
||||
is "$output" "true"
|
||||
run_podman kube down $SERVER/testpod.yaml
|
||||
run_podman 125 inspect test_pod-test
|
||||
is "$output" ".*Error: inspecting object: no such object: \"test_pod-test\""
|
||||
is "$output" ".*Error: no such object: \"test_pod-test\""
|
||||
|
||||
run_podman pod rm -a -f
|
||||
run_podman rm -a -f -t0
|
||||
|
Reference in New Issue
Block a user