Allow for nil buildkit References

Signed-off-by: Joel Longtine <joel@dagger.io>
This commit is contained in:
Joel Longtine
2021-12-21 10:42:05 -07:00
parent 75d5ab8f01
commit a90ff8ab94
6 changed files with 20 additions and 15 deletions

View File

@@ -3,7 +3,6 @@ package task
import (
"context"
"github.com/moby/buildkit/client/llb"
"go.dagger.io/dagger/compiler"
"go.dagger.io/dagger/plancontext"
"go.dagger.io/dagger/solver"
@@ -17,13 +16,7 @@ type scratchTask struct {
}
func (t *scratchTask) Run(ctx context.Context, pctx *plancontext.Context, s solver.Solver, v *compiler.Value) (*compiler.Value, error) {
st := llb.Scratch()
result, err := s.Solve(ctx, st, pctx.Platform.Get())
if err != nil {
return nil, err
}
fs := pctx.FS.New(result)
fs := pctx.FS.New(nil)
return compiler.NewValue().FillFields(map[string]interface{}{
"output": fs.MarshalCUE(),