File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -528,19 +528,25 @@ OuterLoop:
528
528
var findErr error
529
529
if v .Name == "DB_PASSWORD" {
530
530
password , findErr = FindValueFromEnvVar (v , client , namespace )
531
+ if findErr != nil {
532
+ return nil , findErr
533
+ }
531
534
} else if v .Name == "DB_PORT" {
532
535
var portStr string
533
536
portStr , findErr = FindValueFromEnvVar (v , client , namespace )
537
+ if findErr != nil {
538
+ return nil , findErr
539
+ }
534
540
pPort , err := strconv .ParseUint (portStr , 10 , 16 )
535
541
if err != nil {
536
542
return nil , xerrors .Errorf ("error parsing DB_PORT '%s' on pod %s!" , v .Value , pod .Name )
537
543
}
538
544
port = int32 (pPort )
539
545
} else if v .Name == "DB_HOST" {
540
546
host , findErr = FindValueFromEnvVar (v , client , namespace )
541
- }
542
- if findErr != nil {
543
- return nil , findErr
547
+ if findErr != nil {
548
+ return nil , findErr
549
+ }
544
550
}
545
551
if password != "" && port != 0 && host != "" {
546
552
break OuterLoop
You can’t perform that action at this time.
0 commit comments