Skip to content

Commit 2f8ab30

Browse files
committed
executor: rebase the path of submount error
Signed-off-by: Tonis Tiigi <[email protected]>
1 parent a7720ed commit 2f8ab30

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

executor/oci/spec.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,12 @@ func GenerateSpec(ctx context.Context, meta executor.Meta, mounts []executor.Mou
192192
mount, err = sm.subMount(mount, m.Selector)
193193
if err != nil {
194194
releaseAll()
195+
var os *os.PathError
196+
if errors.As(err, &os) {
197+
if strings.HasSuffix(os.Path, m.Selector) {
198+
os.Path = m.Selector
199+
}
200+
}
195201
return nil, nil, err
196202
}
197203
s.Mounts = append(s.Mounts, specs.Mount{

0 commit comments

Comments
 (0)