Skip to content

Commit 97a45ef

Browse files
committed
Use SkipOutput instead of -1 for output indexes to clarify semantics.
Signed-off-by: Ben Longo <[email protected]>
1 parent 6b004d3 commit 97a45ef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

client/llb/exec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ func (e *ExecOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, []
339339
inputIndex = pb.Empty
340340
}
341341

342-
outputIndex := pb.OutputIndex(-1)
342+
outputIndex := pb.SkipOutput
343343
if !m.noOutput && !m.readonly && m.cacheID == "" && !m.tmpfs {
344344
outputIndex = pb.OutputIndex(outIndex)
345345
outIndex++

client/llb/fileop.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ func (f *FileOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, []
702702
pop.Inputs = state.inputs
703703

704704
for i, st := range state.actions {
705-
output := pb.OutputIndex(-1)
705+
output := pb.SkipOutput
706706
if i+1 == len(state.actions) {
707707
output = 0
708708
}

0 commit comments

Comments
 (0)