Skip to content

Commit d7f9fab

Browse files
authored
fix(app): check if kustomzize or helm block aren't nil before trying to expand (#656)
Signed-off-by: Nathanael Liechti <[email protected]>
1 parent 2da180c commit d7f9fab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

argocd/structure_application.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ func expandApplicationSource(_ass []interface{}, featureApplicationSourceNameSup
9999
s.Chart = v.(string)
100100
}
101101

102-
if v, ok := as["helm"]; ok {
102+
if v, ok := as["helm"]; ok && v != nil {
103103
s.Helm = expandApplicationSourceHelm(v.([]interface{}))
104104
}
105105

106-
if v, ok := as["kustomize"]; ok {
106+
if v, ok := as["kustomize"]; ok && v != nil {
107107
s.Kustomize = expandApplicationSourceKustomize(v.([]interface{}))
108108
}
109109

0 commit comments

Comments
 (0)