mirror of
https://github.com/moby/buildkit.git
synced 2026-08-08 08:40:45 +00:00
client/llb: fix cap marshalling
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
@@ -199,6 +199,14 @@ func (e *ExecOp) Marshal(c *Constraints) (digest.Digest, []byte, *pb.OpMetadata,
|
||||
}
|
||||
}
|
||||
|
||||
if len(e.secrets) > 0 {
|
||||
addCap(&e.constraints, pb.CapMountSecret)
|
||||
}
|
||||
|
||||
if len(e.ssh) > 0 {
|
||||
addCap(&e.constraints, pb.CapMountSSH)
|
||||
}
|
||||
|
||||
pop, md := MarshalConstraints(c, &e.constraints)
|
||||
pop.Op = &pb.Op_Exec{
|
||||
Exec: peo,
|
||||
@@ -266,14 +274,6 @@ func (e *ExecOp) Marshal(c *Constraints) (digest.Digest, []byte, *pb.OpMetadata,
|
||||
peo.Mounts = append(peo.Mounts, pm)
|
||||
}
|
||||
|
||||
if len(e.secrets) > 0 {
|
||||
addCap(&e.constraints, pb.CapMountSecret)
|
||||
}
|
||||
|
||||
if len(e.ssh) > 0 {
|
||||
addCap(&e.constraints, pb.CapMountSSH)
|
||||
}
|
||||
|
||||
for _, s := range e.secrets {
|
||||
pm := &pb.Mount{
|
||||
Dest: s.Target,
|
||||
|
||||
Reference in New Issue
Block a user