op.#Exec hack: improve performance by 100x on big configs

Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
This commit is contained in:
Guillaume de Rouville
2021-07-29 13:29:15 +02:00
parent 82d95a5c64
commit 9f90aca2b7
2 changed files with 11 additions and 1 deletions

View File

@@ -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