feat(cli): add command for upgrading one plugin

This commit is contained in:
bergquist
2016-02-16 08:49:27 +01:00
parent 36f4f1d0f3
commit 4131d8b57a
5 changed files with 42 additions and 18 deletions

View File

@ -71,15 +71,14 @@ func InstallPlugin(pluginName, pluginFolder, version string) error {
err = downloadFile(plugin.Id, pluginFolder, downloadURL)
if err == nil {
log.Info("Installed %s successfully ✔\n", plugin.Id)
log.Infof("Installed %v successfully ✔\n", plugin.Id)
}
res := s.ReadPlugin(pluginFolder, pluginName)
res, _ := s.ReadPlugin(pluginFolder, pluginName)
for _, v := range res.Dependency.Plugins {
log.Infof("Installing Dependency: %s\n", v.Id)
InstallPlugin(v.Id, pluginFolder, "")
log.Infof("Installed Dependency: %v ✔\n", v.Id)
}
return err