feat: Emit clear error message instead of panic on empty chart name (#1171)

Resolves #999
This commit is contained in:
KUOKA Yusuke 2020-04-04 15:32:22 +09:00 committed by GitHub
parent 1654ce4c18
commit a2c62c9e73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -207,6 +207,12 @@ func (ld *desiredStateLoader) renderAndLoad(env, overrodeEnv *environment.Enviro
return nil, err return nil, err
} }
for i, r := range currentState.Releases {
if r.Chart == "" {
return nil, fmt.Errorf("error during %s parsing: encountered empty chart while reading release %q at index %d", id, r.Name, i)
}
}
if finalState == nil { if finalState == nil {
finalState = currentState finalState = currentState
} else { } else {