Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

chart-repo: panics when there are no charts to import #603

Open
prydonius opened this issue Feb 21, 2019 · 1 comment
Open

chart-repo: panics when there are no charts to import #603

prydonius opened this issue Feb 21, 2019 · 1 comment

Comments

@prydonius
Copy link
Member

First reported on Slack (https://kubernetes.slack.com/archives/C9D3TSUG4/p1550784319000900), it looks like if https://github.com/helm/monocular/blob/v1.2.0/cmd/chart-repo/utils.go#L100 comes back with an empty list (if there are no entries in the index.yaml, or all charts are deprecated), then https://github.com/helm/monocular/blob/v1.2.0/cmd/chart-repo/utils.go#L260 results in a panic as it tries to access the first element of the charts array.

We should exit earlier with a suitable error message when charts is empty.

@Dean-Coakley
Copy link
Contributor

@prydonius This can be closed?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants