execution/oci: validate bundle path

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca 2016-12-16 15:15:54 +01:00
parent a812199b07
commit d083334621
No known key found for this signature in database
GPG key ID: B2BEAD150DE936B9

View file

@ -37,6 +37,9 @@ type OCIRuntime struct {
}
func (r *OCIRuntime) Create(ctx context.Context, id string, o execution.CreateOpts) (container *execution.Container, err error) {
if o.Bundle == "" {
return nil, errors.New("bundle path cannot be an empty string")
}
oio, err := newOIO(o.Stdin, o.Stdout, o.Stderr, o.Console)
if err != nil {
return nil, err