From d089e0b9527ba85075a2db02b55e7002847a0e8d Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Wed, 24 Jan 2024 15:05:14 -0800 Subject: [PATCH] oci: fix error handling on submount calls Signed-off-by: Tonis Tiigi (cherry picked from commit 42d866ef3bcb333b21734acb861e3009449f4058) (cherry picked from commit e81066f8a8623dc876f3d64fae8f693c17ecdc1a) --- executor/oci/spec.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/executor/oci/spec.go b/executor/oci/spec.go index 5efb3ee95580..8842f362a3ef 100644 --- a/executor/oci/spec.go +++ b/executor/oci/spec.go @@ -230,12 +230,12 @@ func (s *submounts) subMount(m mount.Mount, subPath string) (mount.Mount, error) } h, err := hashstructure.Hash(m, hashstructure.FormatV2, nil) if err != nil { - return mount.Mount{}, nil + return mount.Mount{}, err } if mr, ok := s.m[h]; ok { sm, err := sub(mr.mount, subPath) if err != nil { - return mount.Mount{}, nil + return mount.Mount{}, err } return sm, nil }