engine.#Copy matches docker.#Copy

Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
Richard Jones
2022-01-27 20:09:12 -07:00
parent 39e206e7d2
commit 7eb10f96fb
6 changed files with 29 additions and 30 deletions

View File

@@ -29,17 +29,17 @@ func (t *copyTask) Run(ctx context.Context, pctx *plancontext.Context, s solver.
return nil, err
}
sourceRoot, err := pctx.FS.FromValue(v.Lookup("source.root"))
contents, err := pctx.FS.FromValue(v.Lookup("contents"))
if err != nil {
return nil, err
}
sourceState, err := sourceRoot.State()
contentsState, err := contents.State()
if err != nil {
return nil, err
}
sourcePath, err := v.Lookup("source.path").String()
sourcePath, err := v.Lookup("source").String()
if err != nil {
return nil, err
}
@@ -51,7 +51,7 @@ func (t *copyTask) Run(ctx context.Context, pctx *plancontext.Context, s solver.
outputState := inputState.File(
llb.Copy(
sourceState,
contentsState,
sourcePath,
destPath,
// FIXME: allow more configurable llb options