Skip to content

Commit

Permalink
Merge pull request #2068 from crazy-max/inspect-fix-platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
jedevc authored Sep 30, 2023
2 parents 6c77b76 + 22e61ef commit 2c2294f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion commands/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ func runInspect(dockerCli command.Cli, in inspectOptions) error {
if 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() {
fmt.Fprintf(w, "Features:\n")
features := nodes[i].Driver.Features(ctx)
Expand Down

0 comments on commit 2c2294f

Please sign in to comment.