Merge pull request #1610 from technosophos/fix/1609-plugin-command-panic

fix(helm): handle errors when plugin command is not found
pull/1621/head
Matt Butcher 8 years ago committed by GitHub
commit ac628a82cf

@ -78,10 +78,12 @@ func loadPlugins(baseCmd *cobra.Command, home helmpath.Home, out io.Writer) {
prog.Stdout = out
prog.Stderr = os.Stderr
if err := prog.Run(); err != nil {
eerr := err.(*exec.ExitError)
if eerr, ok := err.(*exec.ExitError); ok {
os.Stderr.Write(eerr.Stderr)
return fmt.Errorf("plugin %q exited with error", md.Name)
}
return err
}
return nil
},
// This passes all the flags to the subcommand.

Loading…
Cancel
Save