Skip to content

Commit 37c81da

Browse files
committed
Added required tools in board details
1 parent de8b37f commit 37c81da

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

commands/board/details.go

+12-1
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,15 @@ func runDetailsCommand(cmd *cobra.Command, args []string) {
8383
details.ConfigOptions = append(details.ConfigOptions, configOption)
8484
}
8585

86+
details.RequiredTools = board.PlatformRelease.Dependencies
87+
8688
output.Emit(details)
8789
}
8890

8991
type boardDetails struct {
9092
Name string
9193
ConfigOptions []*boardConfigOption
94+
RequiredTools []*cores.ToolDependency
9295
}
9396

9497
type boardConfigOption struct {
@@ -114,8 +117,16 @@ func (details *boardDetails) EmitJSON() string {
114117

115118
func (details *boardDetails) EmitTerminal() string {
116119
table := output.NewTable()
117-
table.AddRow("Board name:", details.Name)
118120
table.SetColumnWidthMode(1, output.Average)
121+
table.AddRow("Board name:", details.Name)
122+
for i, tool := range details.RequiredTools {
123+
head := ""
124+
if i == 0 {
125+
table.AddRow()
126+
head = "Required tools:"
127+
}
128+
table.AddRow(head, tool.ToolPackager+":"+tool.ToolName, "", tool.ToolVersion)
129+
}
119130
for _, option := range details.ConfigOptions {
120131
table.AddRow()
121132
table.AddRow("Option:",

0 commit comments

Comments
 (0)