Make engine.#Scratch a specialization of #FS, rather than a task
Signed-off-by: Joel Longtine <joel@dagger.io>
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
package task
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"go.dagger.io/dagger/compiler"
|
||||
"go.dagger.io/dagger/plancontext"
|
||||
"go.dagger.io/dagger/solver"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Register("Scratch", func() Task { return &scratchTask{} })
|
||||
}
|
||||
|
||||
type scratchTask struct {
|
||||
}
|
||||
|
||||
func (t *scratchTask) Run(ctx context.Context, pctx *plancontext.Context, s solver.Solver, v *compiler.Value) (*compiler.Value, error) {
|
||||
fs := pctx.FS.New(nil)
|
||||
|
||||
return compiler.NewValue().FillFields(map[string]interface{}{
|
||||
"output": fs.MarshalCUE(),
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user