plugin installer: Remove extra spaces in log messages

This commit is contained in:
Dmytro Maluka
2025-08-20 22:19:47 +02:00
parent 7a252f4986
commit 094b02da4c

View File

@@ -650,12 +650,12 @@ func PluginCommand(out io.Writer, cmd string, args []string) {
if pp == nil {
fmt.Fprintln(out, "Unknown plugin \""+plugin+"\"")
} else if err := pp.IsInstallable(out); err != nil {
fmt.Fprintln(out, "Error installing ", plugin, ": ", err)
fmt.Fprintln(out, "Error installing "+plugin+": ", err)
} else {
for _, installed := range installedVersions {
if pp.Name == installed.Pack().Name {
if pp.Versions[0].Version.Compare(installed.Version) == 1 {
fmt.Fprintln(out, pp.Name, " is already installed but out-of-date: use 'plugin update ", pp.Name, "' to update")
fmt.Fprintln(out, pp.Name, "is already installed but out-of-date: use 'plugin update "+pp.Name+"' to update")
} else {
fmt.Fprintln(out, pp.Name, "is already installed")
}
@@ -685,6 +685,7 @@ func PluginCommand(out io.Writer, cmd string, args []string) {
}
}
}
removed = strings.TrimSpace(removed)
if removed != "" {
fmt.Fprintln(out, "Removed", removed)
} else {