From 8b4d02540ff0069f390eb802333d643cb3c270de Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Mon, 3 Jan 2022 14:34:49 -0700 Subject: [PATCH] We need to use the State() function, rather than Result().ToState() Signed-off-by: Joel Longtine --- environment/pipeline.go | 2 +- plan/task/build.go | 2 +- plan/task/mkdir.go | 2 +- plan/task/outputdirectory.go | 2 +- plan/task/push.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/environment/pipeline.go b/environment/pipeline.go index 98e20edb..6e5f08f2 100644 --- a/environment/pipeline.go +++ b/environment/pipeline.go @@ -217,7 +217,7 @@ func (p *Pipeline) doOp(ctx context.Context, op *compiler.Value, st llb.State) ( if err != nil { return st, nil } - return fs.Result().ToState() + return fs.State() } do, err := op.Lookup("do").String() diff --git a/plan/task/build.go b/plan/task/build.go index da3b8d0c..31b5f127 100644 --- a/plan/task/build.go +++ b/plan/task/build.go @@ -60,7 +60,7 @@ func (t *buildTask) dockerfile(ctx context.Context, pctx *plancontext.Context, s return nil, err } - sourceSt, err := source.Result().ToState() + sourceSt, err := source.State() if err != nil { return nil, err } diff --git a/plan/task/mkdir.go b/plan/task/mkdir.go index 2351590c..04e2f40c 100644 --- a/plan/task/mkdir.go +++ b/plan/task/mkdir.go @@ -51,7 +51,7 @@ func (t *mkdirTask) Run(ctx context.Context, pctx *plancontext.Context, s solver } // Retrieve input llb state - inputState, err := input.Result().ToState() + inputState, err := input.State() if err != nil { return nil, err } diff --git a/plan/task/outputdirectory.go b/plan/task/outputdirectory.go index 44fbe3d9..f907998d 100644 --- a/plan/task/outputdirectory.go +++ b/plan/task/outputdirectory.go @@ -27,7 +27,7 @@ func (c outputDirectoryTask) Run(ctx context.Context, pctx *plancontext.Context, return nil, err } - st, err := contents.Result().ToState() + st, err := contents.State() if err != nil { return nil, err } diff --git a/plan/task/push.go b/plan/task/push.go index 17d0834d..0cce7cb0 100644 --- a/plan/task/push.go +++ b/plan/task/push.go @@ -50,7 +50,7 @@ func (c *pushTask) Run(ctx context.Context, pctx *plancontext.Context, s solver. if err != nil { return nil, err } - st, err := input.Result().ToState() + st, err := input.State() if err != nil { return nil, err }