Commit 5abaf26b by bergquist

style(cli): remove some logging

parent bd21a08b
...@@ -3,7 +3,7 @@ package commands ...@@ -3,7 +3,7 @@ package commands
import ( import (
"errors" "errors"
"github.com/grafana/grafana/pkg/cmd/grafana-cli/log" "fmt"
m "github.com/grafana/grafana/pkg/cmd/grafana-cli/models" m "github.com/grafana/grafana/pkg/cmd/grafana-cli/models"
services "github.com/grafana/grafana/pkg/cmd/grafana-cli/services" services "github.com/grafana/grafana/pkg/cmd/grafana-cli/services"
) )
...@@ -15,22 +15,17 @@ func removeCommand(c CommandLine) error { ...@@ -15,22 +15,17 @@ func removeCommand(c CommandLine) error {
pluginPath := c.GlobalString("pluginsDir") pluginPath := c.GlobalString("pluginsDir")
localPlugins := getPluginss(pluginPath) localPlugins := getPluginss(pluginPath)
log.Info("remove!\n")
plugin := c.Args().First() plugin := c.Args().First()
log.Info("plugin: " + plugin + "\n")
if plugin == "" { if plugin == "" {
return errors.New("Missing plugin parameter") return errors.New("Missing plugin parameter")
} }
log.Infof("plugins : \n%v\n", localPlugins)
for _, p := range localPlugins { for _, p := range localPlugins {
if p.Id == c.Args().First() { if p.Id == c.Args().First() {
log.Infof("removing plugin %s", p.Id)
removePlugin(pluginPath, p.Id) removePlugin(pluginPath, p.Id)
return nil
} }
} }
return nil return fmt.Errorf("Could not find plugin named %s", c.Args().First())
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment