Commit 645293e5 by bergquist

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

closes #5885
parent b55b7cde
...@@ -14,7 +14,7 @@ func runCommand(command func(commandLine CommandLine) error) func(context *cli.C ...@@ -14,7 +14,7 @@ func runCommand(command func(commandLine CommandLine) error) func(context *cli.C
cmd := &contextCommandLine{context} cmd := &contextCommandLine{context}
if err := command(cmd); err != nil { if err := command(cmd); err != nil {
logger.Errorf("\n%s: ", color.RedString("Error")) logger.Errorf("\n%s: ", color.RedString("Error"))
logger.Errorf("%s\n\n", err) logger.Errorf("%s %s\n\n", color.RedString("✗"), err)
cmd.ShowHelp() cmd.ShowHelp()
os.Exit(1) os.Exit(1)
......
...@@ -53,8 +53,16 @@ func upgradeAllCommand(c CommandLine) error { ...@@ -53,8 +53,16 @@ func upgradeAllCommand(c CommandLine) error {
for _, p := range pluginsToUpgrade { for _, p := range pluginsToUpgrade {
logger.Infof("Updating %v \n", p.Id) logger.Infof("Updating %v \n", p.Id)
s.RemoveInstalledPlugin(pluginsDir, p.Id) var err error
InstallPlugin(p.Id, "", c) err = s.RemoveInstalledPlugin(pluginsDir, p.Id)
if err != nil {
return err
}
err = InstallPlugin(p.Id, "", c)
if err != nil {
return err
}
} }
return nil return nil
......
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