diff --git a/environment/pipeline.go b/environment/pipeline.go index d94507dd..ceea712f 100644 --- a/environment/pipeline.go +++ b/environment/pipeline.go @@ -512,6 +512,10 @@ func (p *Pipeline) mount(ctx context.Context, dest string, mnt *compiler.Value) } // eg. mount: "/foo": { from: www.source } + if !mnt.Lookup("from").Exists() { + return nil, fmt.Errorf("invalid mount: should have %s structure", + "{from: _, path: string | *\"/\"}") + } from := NewPipeline(mnt.Lookup("from"), p.s) if err := from.Run(ctx); err != nil { return nil, err diff --git a/stdlib/dagger/op/op.cue b/stdlib/dagger/op/op.cue index 9e492089..44c2f7dd 100644 --- a/stdlib/dagger/op/op.cue +++ b/stdlib/dagger/op/op.cue @@ -50,7 +50,13 @@ package op // `true` means also ignoring the mount cache volumes always?: true | *false dir: string | *"/" - mount: [string]: "tmpfs" | "cache" | {from: _, path: string | *"/"} | {secret: _} + // HACK: FIXME later [Performance related] + // mount: [string]: "tmpfs" | "cache" | {from: _, path: string | *"/"} | {secret: _} + // https://github.com/dagger/dagger/issues/856 + mount: [string]: { + _ + ... + } // Map of hostnames to ip hosts?: [string]: string // User to exec with (if left empty, will default to the set user in the image)