containerd / containerd/nerdctl
Image Removing Exit Code
- Dominant language
- Go
- Stars
- 10.4k
- Forks
- 826
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 44
Description
### Description
Hello when I am trying to remove image with --force flag, even though not existing image, bash is showing that, command execution is successfully which means 0. Here are three different situation;
|command| output| exit-code| comment|
|---|---|---|---|
|nerdctl image rm -f image_name --namespace k8s.io| ERRO[0000] 1 errors: no such image: image_name| 0| There is no container named container_name and didnt remove, but exit code is 0 which means succesfully, I am expecting exit code 1|
|nerdctl image rm image_name --namespace k8s.io | ERRO[0000] 1 errors: no such image: image_name| 1| Normal behavior there is no problem|
|nerdctl image rm -f existing_image --namespace k8s.io| -| 0| Normal behavior there is no problem|

### Steps to reproduce the issue
1. nerdctl image rm -f image_name --namespace k8s.io
### Describe the results you received and expected
I am expecting exit code 1 even though i forced to remove to not existing image.
### What version of nerdctl are you using?
nerdctl version 1.4.0
### Are you using a variant of nerdctl? (e.g., Rancher Desktop)
None
### Host information
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.