monocular
monocular copied to clipboard
chart-repo: panics when there are no charts to import
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 This can be closed?