mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: github.com/moby/buildkit 25bec7145b39 (v0.14.0-dev)
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
18
vendor/github.com/moby/buildkit/client/llb/exec.go
generated
vendored
18
vendor/github.com/moby/buildkit/client/llb/exec.go
generated
vendored
@ -438,15 +438,23 @@ func (e *ExecOp) Output() Output {
|
||||
}
|
||||
|
||||
func (e *ExecOp) Inputs() (inputs []Output) {
|
||||
mm := map[Output]struct{}{}
|
||||
// make sure mounts are sorted
|
||||
// the same sort occurs in (*ExecOp).Marshal, and this
|
||||
// sort must be the same
|
||||
sort.Slice(e.mounts, func(i int, j int) bool {
|
||||
return e.mounts[i].target < e.mounts[j].target
|
||||
})
|
||||
|
||||
seen := map[Output]struct{}{}
|
||||
for _, m := range e.mounts {
|
||||
if m.source != nil {
|
||||
mm[m.source] = struct{}{}
|
||||
if _, ok := seen[m.source]; !ok {
|
||||
inputs = append(inputs, m.source)
|
||||
seen[m.source] = struct{}{}
|
||||
}
|
||||
}
|
||||
}
|
||||
for o := range mm {
|
||||
inputs = append(inputs, o)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user