mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-19 01:47:43 +08:00
inspect: do not display platforms field if empty
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
e6756d951a
commit
22e61ef06f
@ -93,7 +93,10 @@ func runInspect(dockerCli command.Cli, in inspectOptions) error {
|
|||||||
if nodes[i].Version != "" {
|
if nodes[i].Version != "" {
|
||||||
fmt.Fprintf(w, "Buildkit:\t%s\n", nodes[i].Version)
|
fmt.Fprintf(w, "Buildkit:\t%s\n", nodes[i].Version)
|
||||||
}
|
}
|
||||||
fmt.Fprintf(w, "Platforms:\t%s\n", strings.Join(platformutil.FormatInGroups(n.Node.Platforms, n.Platforms), ", "))
|
platforms := platformutil.FormatInGroups(n.Node.Platforms, n.Platforms)
|
||||||
|
if len(platforms) > 0 {
|
||||||
|
fmt.Fprintf(w, "Platforms:\t%s\n", strings.Join(platforms, ", "))
|
||||||
|
}
|
||||||
if debug.IsEnabled() {
|
if debug.IsEnabled() {
|
||||||
fmt.Fprintf(w, "Features:\n")
|
fmt.Fprintf(w, "Features:\n")
|
||||||
features := nodes[i].Driver.Features(ctx)
|
features := nodes[i].Driver.Features(ctx)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user