@@ -380,24 +380,25 @@ func (r *compileResult) String() string {
380
380
}
381
381
res += libraries .Render () + "\n "
382
382
383
- platforms := table .New ()
384
- platforms .SetHeader (
385
- table .NewCell (tr ("Used platform" ), titleColor ),
386
- table .NewCell (tr ("Version" ), titleColor ),
387
- table .NewCell (tr ("Path" ), pathColor ))
388
- boardPlatform := build .GetBoardPlatform ()
389
- platforms .AddRow (
390
- table .NewCell (boardPlatform .GetId (), nameColor ),
391
- boardPlatform .GetVersion (),
392
- table .NewCell (boardPlatform .GetInstallDir (), pathColor ))
393
- if buildPlatform := build .GetBuildPlatform (); buildPlatform != nil &&
394
- buildPlatform .Id != boardPlatform .Id &&
395
- buildPlatform .Version != boardPlatform .Version {
383
+ if boardPlatform := build .GetBoardPlatform (); boardPlatform != nil {
384
+ platforms := table .New ()
385
+ platforms .SetHeader (
386
+ table .NewCell (tr ("Used platform" ), titleColor ),
387
+ table .NewCell (tr ("Version" ), titleColor ),
388
+ table .NewCell (tr ("Path" ), pathColor ))
396
389
platforms .AddRow (
397
- table .NewCell (buildPlatform .GetId (), nameColor ),
398
- buildPlatform .GetVersion (),
399
- table .NewCell (buildPlatform .GetInstallDir (), pathColor ))
390
+ table .NewCell (boardPlatform .GetId (), nameColor ),
391
+ boardPlatform .GetVersion (),
392
+ table .NewCell (boardPlatform .GetInstallDir (), pathColor ))
393
+ if buildPlatform := build .GetBuildPlatform (); buildPlatform != nil &&
394
+ buildPlatform .Id != boardPlatform .Id &&
395
+ buildPlatform .Version != boardPlatform .Version {
396
+ platforms .AddRow (
397
+ table .NewCell (buildPlatform .GetId (), nameColor ),
398
+ buildPlatform .GetVersion (),
399
+ table .NewCell (buildPlatform .GetInstallDir (), pathColor ))
400
+ }
401
+ res += platforms .Render ()
400
402
}
401
- res += platforms .Render ()
402
403
return res
403
404
}
0 commit comments