Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List fails without default index #750

Closed
junnplus opened this issue Dec 30, 2021 · 4 comments · Fixed by #751
Closed

List fails without default index #750

junnplus opened this issue Dec 30, 2021 · 4 comments · Fixed by #751
Labels
area/multi-index kind/bug Categorizes issue or PR as related to a bug.

Comments

@junnplus
Copy link
Contributor

[N] ❯ kubectl krew list
F1230 10:47:56.057894   30356 root.go:79] krew local plugin index is not initialized (run "kubectl krew update")

I still have the same problem after update.

list command always check default index, but update command will skip add default when found other index. https://github.com/kubernetes-sigs/krew/blob/master/cmd/krew/cmd/update.go#L139-L142

@ahmetb
Copy link
Member

ahmetb commented Dec 30, 2021

Thanks for the report. Do I understand your use case correctly:

  • install krew
  • krew index add $other-index
  • krew list: fails with the error you mentioned?

@junnplus
Copy link
Contributor Author

@ahmetb Yes, I need other index to install plugin.

@ahmetb
Copy link
Member

ahmetb commented Dec 30, 2021

Thanks that must be an oversight. We should allow using krew without the default index.

/kind bug
/area multi-index

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. area/multi-index labels Dec 30, 2021
@junnplus
Copy link
Contributor Author

We should allow using krew without the default index.

I agree with you. The default index is not required.
So i make a PR to check existing index.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/multi-index kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants