Skip to content

Commit 58640c9

Browse files
authored
Merge pull request containerd#388 from runcom/must-bundle-path
execution/oci: validate bundle path
2 parents 286ea04 + d083334 commit 58640c9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

execution/executors/oci/oci.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ type OCIRuntime struct {
3737
}
3838

3939
func (r *OCIRuntime) Create(ctx context.Context, id string, o execution.CreateOpts) (container *execution.Container, err error) {
40+
if o.Bundle == "" {
41+
return nil, errors.New("bundle path cannot be an empty string")
42+
}
4043
oio, err := newOIO(o.Stdin, o.Stdout, o.Stderr, o.Console)
4144
if err != nil {
4245
return nil, err

0 commit comments

Comments
 (0)