Merge pull request #1423 from aluzzardi/exec-mount-errors

exec: mount: improve error reporting on non-concrete mounts
This commit is contained in:
Andrea Luzzardi
2022-01-18 15:11:37 -08:00
committed by GitHub

View File

@@ -139,6 +139,10 @@ func (t execTask) mountAll(pctx *plancontext.Context, mounts *compiler.Value) ([
return nil, err
}
for _, mnt := range fields {
if mnt.Value.Lookup("dest").IsConcreteR() != nil {
return nil, fmt.Errorf("mount %q is not concrete", mnt.Selector.String())
}
dest, err := mnt.Value.Lookup("dest").String()
if err != nil {
return nil, err