summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-05-21 16:02:13 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2021-05-22 04:58:48 -0400
commit4c095aa7e2e31e9b8105a1de9c7b62f6283d3b42 (patch)
tree41e62572d54a3c3be24c21a616251068205327de
parent490915c68e6fce48508d42d138ac1c92c877abe7 (diff)
downloadpodman-4c095aa7e2e31e9b8105a1de9c7b62f6283d3b42.tar.gz
podman-4c095aa7e2e31e9b8105a1de9c7b62f6283d3b42.tar.bz2
podman-4c095aa7e2e31e9b8105a1de9c7b62f6283d3b42.zip
Improve OCI Runtime error
ErrOCIRuntimeNotFound error is misleading. Try to make it more understandable to the user that the OCI Runtime IE crun or runc is not missing, but the command they attempted to run within the container is missing. [NO TESTS NEEDED] Regular tests should handle this. Fixes: https://github.com/containers/podman/issues/10432 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
-rw-r--r--libpod/define/errors.go2
-rw-r--r--test/system/030-run.bats2
2 files changed, 2 insertions, 2 deletions
diff --git a/libpod/define/errors.go b/libpod/define/errors.go
index 81bf5f69c..9fd210eed 100644
--- a/libpod/define/errors.go
+++ b/libpod/define/errors.go
@@ -152,7 +152,7 @@ var (
// ErrOCIRuntimeNotFound indicates the OCI runtime attempted to invoke a command
// that was not found
- ErrOCIRuntimeNotFound = errors.New("OCI not found")
+ ErrOCIRuntimeNotFound = errors.New("OCI runtime attempted to invoke a command that was not found")
// ErrOCIRuntimeUnavailable indicates that the OCI runtime associated to a container
// could not be found in the configuration
diff --git a/test/system/030-run.bats b/test/system/030-run.bats
index e12c32ef5..2ea981a85 100644
--- a/test/system/030-run.bats
+++ b/test/system/030-run.bats
@@ -14,7 +14,7 @@ load helpers
# ...but check the configured runtime engine, and switch to crun as needed
run_podman info --format '{{ .Host.OCIRuntime.Path }}'
if expr "$output" : ".*/crun"; then
- err_no_such_cmd="Error: executable file.* not found in \$PATH: No such file or directory: OCI not found"
+ err_no_such_cmd="Error: executable file.* not found in \$PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found"
err_no_exec_dir="Error: open executable: Operation not permitted: OCI permission denied"
fi