fix(cli): improve error message for upgrade-all

closes #5885
This commit is contained in:
bergquist
2016-08-30 13:47:42 +02:00
parent b55b7cde4b
commit 645293e590
2 changed files with 11 additions and 3 deletions

View File

@ -53,8 +53,16 @@ func upgradeAllCommand(c CommandLine) error {
for _, p := range pluginsToUpgrade {
logger.Infof("Updating %v \n", p.Id)
s.RemoveInstalledPlugin(pluginsDir, p.Id)
InstallPlugin(p.Id, "", c)
var err error
err = s.RemoveInstalledPlugin(pluginsDir, p.Id)
if err != nil {
return err
}
err = InstallPlugin(p.Id, "", c)
if err != nil {
return err
}
}
return nil