From 400c0dd4466f89b1ad8816083752cfb4cbb804ec Mon Sep 17 00:00:00 2001 From: Alessio Perugini Date: Thu, 19 Oct 2023 16:28:42 +0200 Subject: [PATCH] cli: update completition --- internal/cli/arguments/completion.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/cli/arguments/completion.go b/internal/cli/arguments/completion.go index 692c9dc3c7a..10a8c1b68eb 100644 --- a/internal/cli/arguments/completion.go +++ b/internal/cli/arguments/completion.go @@ -155,8 +155,11 @@ func GetInstallableCores() []string { }) var res []string // transform the data structure for the completion - for _, i := range platforms.SearchOutput { - res = append(res, i.GetMetadata().GetId()+"\t"+i.GetReleases()[i.GetLatestVersion()].GetName()) + for _, i := range platforms.GetSearchOutput() { + if i.GetLatestCompatibleVersion() == "" { + continue + } + res = append(res, i.GetMetadata().GetId()+"\t"+i.GetLatestCompatibleRelease().GetName()) } return res }