Skip to content

Commit 07571f9

Browse files
committed
Fix options parsing - ensuring that TOKEN_PATH and TOKEN_XXX aren't mixed (#367)
1 parent 365bc66 commit 07571f9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/app/options.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ type Options struct {
7474
selfhosted selfhosted.Options
7575

7676
CacheTimeout time.Duration
77-
RequeueDuration time.Duration
7877
GracefulShutdownTimeout time.Duration
7978
CacheSyncPeriod time.Duration
79+
RequeueDuration time.Duration
8080

8181
DefaultTestAll bool
8282
}
@@ -446,9 +446,11 @@ func (o *Options) assignSelfhosted(envs []string) {
446446
}
447447
}
448448

449+
// If we have some selfhosted flags, lets set them here...
449450
if len(o.selfhosted.Host) > 0 {
450451
o.Client.Selfhosted[o.selfhosted.Host] = &o.selfhosted
451452
}
453+
452454
if !validSelfHostedOpts(o) {
453455
panic(fmt.Errorf("invalid self hosted configuration"))
454456
}

0 commit comments

Comments
 (0)