Parcourir la source

fix(cli): add latest version to list-remote command

closes #4205
bergquist il y a 9 ans
Parent
commit
77f93886da
1 fichiers modifiés avec 6 ajouts et 1 suppressions
  1. 6 1
      pkg/cmd/grafana-cli/commands/listremote_command.go

+ 6 - 1
pkg/cmd/grafana-cli/commands/listremote_command.go

@@ -13,7 +13,12 @@ func listremoteCommand(c CommandLine) error {
 	}
 
 	for _, i := range plugin.Plugins {
-		log.Infof("id: %v version:\n", i.Id)
+		pluginVersion := ""
+		if len(i.Versions) > 0 {
+			pluginVersion = i.Versions[0].Version
+		}
+
+		log.Infof("id: %v version: %s\n", i.Id, pluginVersion)
 	}
 
 	return nil