diff --git a/pkg/plugin/hooks.go b/pkg/plugin/hooks.go index eb078bd10..b5ca032ac 100644 --- a/pkg/plugin/hooks.go +++ b/pkg/plugin/hooks.go @@ -21,7 +21,7 @@ const ( Install = "install" // Delete is executed after the plugin is removed. Delete = "delete" - // Update is executed after the plugin is removed. + // Update is executed after the plugin is updated. Update = "update" ) diff --git a/pkg/plugin/installer/installer.go b/pkg/plugin/installer/installer.go index ed264da76..9b0c9a23b 100644 --- a/pkg/plugin/installer/installer.go +++ b/pkg/plugin/installer/installer.go @@ -49,10 +49,10 @@ func Install(i Installer) error { return i.Install() } -// Update updates a plugin to $HELM_HOME. +// Update updates a plugin in $HELM_HOME. func Update(i Installer) error { if _, pathErr := os.Stat(i.Path()); os.IsNotExist(pathErr) { - return errors.New("plugin does not exists") + return errors.New("plugin does not exist") } return i.Update() diff --git a/pkg/plugin/installer/vcs_installer_test.go b/pkg/plugin/installer/vcs_installer_test.go index 81c57aa3f..d86c9b608 100644 --- a/pkg/plugin/installer/vcs_installer_test.go +++ b/pkg/plugin/installer/vcs_installer_test.go @@ -107,9 +107,9 @@ func TestVCSInstaller(t *testing.T) { // Testing update for error if err := Update(i); err == nil { - t.Error("expected error for plugin does not exists, got none") - } else if err.Error() != "plugin does not exists" { - t.Errorf("expected error for plugin does not exists, got (%v)", err) + t.Error("expected error for plugin does not exist, got none") + } else if err.Error() != "plugin does not exist" { + t.Errorf("expected error for plugin does not exist, got (%v)", err) } } @@ -172,9 +172,9 @@ func TestVCSInstallerUpdate(t *testing.T) { } if err := Update(i); err == nil { - t.Error("expected error for plugin does not exists, got none") - } else if err.Error() != "plugin does not exists" { - t.Errorf("expected error for plugin does not exists, got (%v)", err) + t.Error("expected error for plugin does not exist, got none") + } else if err.Error() != "plugin does not exist" { + t.Errorf("expected error for plugin does not exist, got (%v)", err) } // Install plugin before update