@@ -55,7 +55,10 @@ func runListCommand(args []string, all bool, updatableOnly bool) {
55
55
// List gets and prints a list of installed platforms.
56
56
func List (inst * rpc.Instance , all bool , updatableOnly bool ) {
57
57
platforms := GetList (inst , all , updatableOnly )
58
- feedback .PrintResult (installedResult {platforms })
58
+ feedback .PrintResult (installedResult {
59
+ platforms : platforms ,
60
+ updatableOnly : updatableOnly ,
61
+ })
59
62
}
60
63
61
64
// GetList returns a list of installed platforms.
@@ -74,7 +77,8 @@ func GetList(inst *rpc.Instance, all bool, updatableOnly bool) []*rpc.Platform {
74
77
// output from this command requires special formatting, let's create a dedicated
75
78
// feedback.Result implementation
76
79
type installedResult struct {
77
- platforms []* rpc.Platform
80
+ platforms []* rpc.Platform
81
+ updatableOnly bool
78
82
}
79
83
80
84
func (ir installedResult ) Data () interface {} {
@@ -83,6 +87,9 @@ func (ir installedResult) Data() interface{} {
83
87
84
88
func (ir installedResult ) String () string {
85
89
if len (ir .platforms ) == 0 {
90
+ if ir .updatableOnly {
91
+ return tr ("All platforms are up to date." )
92
+ }
86
93
return tr ("No platforms installed." )
87
94
}
88
95
t := table .New ()
0 commit comments