File tree 2 files changed +7
-6
lines changed
2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -37,14 +37,16 @@ func GetPlatforms(req *rpc.PlatformListRequest) ([]*rpc.Platform, error) {
37
37
for _ , platform := range targetPackage .Platforms {
38
38
platformRelease := packageManager .GetInstalledPlatformRelease (platform )
39
39
40
+ // The All flags adds to the list of installed platforms the installable platforms (from the indexes)
40
41
// If both All and UpdatableOnly are set All takes precedence
41
42
if req .All {
42
43
installedVersion := ""
43
- if platformRelease == nil {
44
+ if platformRelease == nil { // if the platform is not installed
44
45
platformRelease = platform .GetLatestRelease ()
45
46
} else {
46
47
installedVersion = platformRelease .Version .String ()
47
48
}
49
+ // it could happen, especially with indexes not perfectly compliant with specs that a platform do not contain a valid release
48
50
if platformRelease != nil {
49
51
rpcPlatform := commands .PlatformReleaseToRPC (platformRelease )
50
52
rpcPlatform .Installed = installedVersion
@@ -59,10 +61,9 @@ func GetPlatforms(req *rpc.PlatformListRequest) ([]*rpc.Platform, error) {
59
61
return nil , & commands.PlatformNotFound {Platform : platform .String (), Cause : errors .New (tr ("the platform has no releases" ))}
60
62
}
61
63
62
- if req .UpdatableOnly {
63
- if latest == platformRelease {
64
- continue
65
- }
64
+ // show only the updatable platforms
65
+ if req .UpdatableOnly && latest == platformRelease {
66
+ continue
66
67
}
67
68
68
69
rpcPlatform := commands .PlatformReleaseToRPC (platformRelease )
Original file line number Diff line number Diff line change @@ -3297,7 +3297,7 @@ msgstr "testing local archive integrity: %s"
3297
3297
msgid "text section exceeds available space in board"
3298
3298
msgstr "text section exceeds available space in board"
3299
3299
3300
- #: commands/core/list.go:59
3300
+ #: commands/core/list.go:61
3301
3301
msgid "the platform has no releases"
3302
3302
msgstr "the platform has no releases"
3303
3303
You can’t perform that action at this time.
0 commit comments