mirror of
https://github.com/helmfile/helmfile.git
synced 2026-09-30 11:13:11 +02:00
Fix crash on missing chart (#1087)
When chart is not set, an exception without any hints occure due normalizeChart tries to access the first character of a 0 length string. Properly inform user of missing chart.
This commit is contained in:
@@ -1424,6 +1424,11 @@ func (st *HelmState) BuildDeps(helm helmexec.Interface) []error {
|
||||
errs := []error{}
|
||||
|
||||
for _, release := range st.Releases {
|
||||
if len(release.Chart) == 0 {
|
||||
errs = append(errs, errors.New("chart is required for: "+release.Name))
|
||||
continue
|
||||
}
|
||||
|
||||
if isLocalChart(release.Chart) {
|
||||
if err := helm.BuildDeps(release.Name, normalizeChart(st.basePath, release.Chart)); err != nil {
|
||||
errs = append(errs, err)
|
||||
|
||||
Reference in New Issue
Block a user