diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2021-08-10 03:59:38 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2021-08-10 04:26:32 +0300 |
commit | 5186f78c179578757a2673264155aa8b287a0efb (patch) | |
tree | b3d0fcd8fdb0b9a32f3e3a2bf9afb5244e6f8ceb /main.go | |
parent | dc2500d0a6e06b3e762902996867d70246173523 (diff) |
fix: do not fail to print --versiondo-not-fail-for-version
when there are missing parameters such as `--listen-http`
by splitting configuration loading and validation.
Related to omnibus-gitlab#6321.
Changelog: other
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -50,6 +50,10 @@ func appMain() { printVersion(config.General.ShowVersion, VERSION) + if err := cfg.Validate(config); err != nil { + log.WithError(err).Fatal("invalid config settings") + } + if config.Sentry.DSN != "" { initErrorReporting(config.Sentry.DSN, config.Sentry.Environment) } |