mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
libpod, pkg: lookup also for crun failures
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -485,10 +485,11 @@ func readConmonPipeData(pipe *os.File, ociLog string) (int, error) {
|
||||
}
|
||||
|
||||
func getOCIRuntimeError(runtimeMsg string) error {
|
||||
if match, _ := regexp.MatchString(".*permission denied.*", runtimeMsg); match {
|
||||
r := strings.ToLower(runtimeMsg)
|
||||
if match, _ := regexp.MatchString(".*permission denied.*|.*operation not permitted.*", r); match {
|
||||
return errors.Wrapf(define.ErrOCIRuntimePermissionDenied, "%s", strings.Trim(runtimeMsg, "\n"))
|
||||
}
|
||||
if match, _ := regexp.MatchString(".*executable file not found in.*", runtimeMsg); match {
|
||||
if match, _ := regexp.MatchString(".*executable file not found in.*|.*no such file or directory.*", r); match {
|
||||
return errors.Wrapf(define.ErrOCIRuntimeNotFound, "%s", strings.Trim(runtimeMsg, "\n"))
|
||||
}
|
||||
return errors.Wrapf(define.ErrOCIRuntime, "%s", strings.Trim(runtimeMsg, "\n"))
|
||||
|
Reference in New Issue
Block a user