Skip to content

Commit 1b8c2a0

Browse files
committed
fix: add nil check
Signed-off-by: chansuke <[email protected]>
1 parent 5b103ea commit 1b8c2a0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/argocd/argocd.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,10 @@ func (a ApplicationType) String() string {
750750
// using regex (e.g., image.tag, *.version, *.imageTag). However, if a Helm chart uses
751751
// uncommon parameter names, this function may not detect them correctly.
752752
func getImageFromSpec(app *v1alpha1.Application, targetImage *image.ContainerImage) *image.ContainerImage {
753+
if targetImage == nil {
754+
return nil
755+
}
756+
753757
appType := getApplicationType(app)
754758
source := getApplicationSource(app)
755759

0 commit comments

Comments
 (0)