From 97a45ef6a4aa67a04151ae563e6056860d48bf1f Mon Sep 17 00:00:00 2001 From: Ben Longo Date: Fri, 16 Dec 2022 23:01:13 -0500 Subject: [PATCH] Use SkipOutput instead of -1 for output indexes to clarify semantics. Signed-off-by: Ben Longo --- client/llb/exec.go | 2 +- client/llb/fileop.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/llb/exec.go b/client/llb/exec.go index 2b1d9bd3f1ee..45133772de98 100644 --- a/client/llb/exec.go +++ b/client/llb/exec.go @@ -339,7 +339,7 @@ func (e *ExecOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, [] inputIndex = pb.Empty } - outputIndex := pb.OutputIndex(-1) + outputIndex := pb.SkipOutput if !m.noOutput && !m.readonly && m.cacheID == "" && !m.tmpfs { outputIndex = pb.OutputIndex(outIndex) outIndex++ diff --git a/client/llb/fileop.go b/client/llb/fileop.go index ffc6da19e417..d632f5a2769e 100644 --- a/client/llb/fileop.go +++ b/client/llb/fileop.go @@ -702,7 +702,7 @@ func (f *FileOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, [] pop.Inputs = state.inputs for i, st := range state.actions { - output := pb.OutputIndex(-1) + output := pb.SkipOutput if i+1 == len(state.actions) { output = 0 }