mirror of
https://github.com/containers/skopeo.git
synced 2025-09-15 06:20:12 +00:00
main: return exit code 2
when an input is not found
This commit makes skopeo return a different exit code when an input is not found. The use case is `osbuild` which uses skopeo to inspect images and it would be nice to differenciate between an image that is not found and general skopeo errors (or errors like network issues etc). I picked exit code `2` for `not found` because it is also the value of `ENOENT`. Man page and a test are added. Signed-off-by: Michael Vogt <mvogt@redhat.com>
This commit is contained in:
committed by
Michael Vogt
parent
d5ac962b5e
commit
16b6f0ade5
@@ -40,7 +40,7 @@ function setup() {
|
||||
expect_output --substring "authentication required"
|
||||
|
||||
# Correct creds, but no such image
|
||||
run_skopeo 1 inspect --tls-verify=false --creds=$testuser:$testpassword \
|
||||
run_skopeo 2 inspect --tls-verify=false --creds=$testuser:$testpassword \
|
||||
docker://localhost:5000/nonesuch
|
||||
expect_output --substring "manifest unknown"
|
||||
|
||||
|
Reference in New Issue
Block a user