Use parentheses for merge+diff vertex names.
This is easier to read than quotes, which result in lots of escaping in progress output. Signed-off-by: Erik Sipsma <erik@sipsma.dev>master
parent
e8f5f523aa
commit
553d3eafda
|
@ -2,7 +2,6 @@ package llbsolver
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/containerd/containerd/platforms"
|
||||
|
@ -271,9 +270,9 @@ func llbOpName(pbOp *pb.Op, load func(digest.Digest) (solver.Vertex, error)) (st
|
|||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
subnames[i] = strconv.Quote(subvtx.Name())
|
||||
subnames[i] = subvtx.Name()
|
||||
}
|
||||
return "merge " + strings.Join(subnames, " + "), nil
|
||||
return "merge " + fmt.Sprintf("(%s)", strings.Join(subnames, ", ")), nil
|
||||
case *pb.Op_Diff:
|
||||
var lowerName string
|
||||
if op.Diff.Lower.Input == -1 {
|
||||
|
@ -283,7 +282,7 @@ func llbOpName(pbOp *pb.Op, load func(digest.Digest) (solver.Vertex, error)) (st
|
|||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
lowerName = strconv.Quote(lowerVtx.Name())
|
||||
lowerName = fmt.Sprintf("(%s)", lowerVtx.Name())
|
||||
}
|
||||
var upperName string
|
||||
if op.Diff.Upper.Input == -1 {
|
||||
|
@ -293,7 +292,7 @@ func llbOpName(pbOp *pb.Op, load func(digest.Digest) (solver.Vertex, error)) (st
|
|||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
upperName = strconv.Quote(upperVtx.Name())
|
||||
upperName = fmt.Sprintf("(%s)", upperVtx.Name())
|
||||
}
|
||||
return "diff " + lowerName + " -> " + upperName, nil
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue