purge plugin directory on `helm plugin remove plug` (#4068)

><> ./bin/helm plugin remove lintr
    Error: Failed to remove plugin lintr, got error (remove /home/bacongobbler/.helm/plugins/helm-lintr: directory not empty)
pull/5280/head
Matthew Fisher 6 years ago committed by GitHub
parent a32f8ebb37
commit 5eb48f4471
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -82,7 +82,7 @@ func (o *pluginRemoveOptions) run(out io.Writer) error {
} }
func removePlugin(p *plugin.Plugin) error { func removePlugin(p *plugin.Plugin) error {
if err := os.Remove(p.Dir); err != nil { if err := os.RemoveAll(p.Dir); err != nil {
return err return err
} }
return runHook(p, plugin.Delete) return runHook(p, plugin.Delete)

Loading…
Cancel
Save