diff --git a/cmd/krew/cmd/install.go b/cmd/krew/cmd/install.go index 8c7fb137..66b7fd95 100644 --- a/cmd/krew/cmd/install.go +++ b/cmd/krew/cmd/install.go @@ -89,6 +89,9 @@ Remarks: for _, name := range pluginNames { plugin, err := indexscanner.LoadPluginFileFromFS(paths.IndexPluginsPath(), name) if err != nil { + if os.IsNotExist(err) { + return errors.Errorf("plugin %q does not exist in the plugin index", name) + } return errors.Wrapf(err, "failed to load plugin %q from the index", name) } install = append(install, plugin) diff --git a/cmd/krew/cmd/upgrade.go b/cmd/krew/cmd/upgrade.go index 09119546..94287836 100644 --- a/cmd/krew/cmd/upgrade.go +++ b/cmd/krew/cmd/upgrade.go @@ -64,6 +64,9 @@ kubectl krew upgrade foo bar"`, for _, name := range pluginNames { plugin, err := indexscanner.LoadPluginFileFromFS(paths.IndexPluginsPath(), name) if err != nil { + if os.IsNotExist(err) { + return errors.Errorf("plugin %q does not exist in the plugin index", name) + } return errors.Wrapf(err, "failed to load the plugin manifest for plugin %s", name) } diff --git a/hack/run-tests.sh b/hack/run-tests.sh index 75780dac..a5bacee8 100755 --- a/hack/run-tests.sh +++ b/hack/run-tests.sh @@ -40,9 +40,6 @@ trap print_status EXIT print_with_color "$color_blue" 'Checking boilerplate' "$SCRIPTDIR"/verify-boilerplate.sh -print_with_color "$color_blue" 'Running gofmt' -"$SCRIPTDIR"/verify-gofmt.sh - print_with_color "$color_blue" 'Running tests' go test -short -race sigs.k8s.io/krew/...