Merge pull request #1293 from jlongtine/engine-scratch-clean-up

Clean up code for `engine.#Scratch`
This commit is contained in:
Sam Alba 2021-12-22 13:56:55 -08:00 committed by GitHub
commit 2531d17ea6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 6 deletions

View File

@ -33,13 +33,9 @@ func (fs *FS) Result() bkgw.Reference {
return fs.result
}
// func (fs *FS) FS() *solver.BuildkitFS {
// return solver.NewBuildkitFS(fs.result)
// }
func (fs *FS) State() (llb.State, error) {
if fs.Result() == nil {
return llb.State{}, nil
return llb.Scratch(), nil
}
return fs.Result().ToState()
}

View File

@ -54,7 +54,6 @@ package engine
// Produce an empty directory
#Scratch: {
@dagger(notimplemented)
$dagger: task: _name: "Scratch"
output: #FS