mirror of
https://github.com/containers/podman.git
synced 2025-10-17 19:24:04 +08:00
Change exit code to 1 on podman rm nosuch container
Make it easy for scripts to determine if a container removal fails versus the container did not exist. If only errors were no such container exit with 1 versus 125. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -128,4 +128,9 @@ var _ = Describe("Podman rm", func() {
|
||||
Expect(podmanTest.NumberOfContainers()).To(Equal(1))
|
||||
|
||||
})
|
||||
It("podman rm bogus container", func() {
|
||||
session := podmanTest.Podman([]string{"rm", "bogus"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(1))
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user