monocular icon indicating copy to clipboard operation
monocular copied to clipboard

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

Open prydonius opened this issue 6 years ago • 1 comments

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.

prydonius avatar Feb 21 '19 22:02 prydonius

@prydonius This can be closed?

Dean-Coakley avatar Mar 30 '19 17:03 Dean-Coakley