mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-18 17:18:16 +02:00
bug: version should be processed before other flags (#99)
This commit is contained in:
parent
4bdb9173ff
commit
1a3add8fbc
1 changed files with 5 additions and 5 deletions
|
@ -26,21 +26,21 @@ var (
|
|||
)
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
if *versionFlag {
|
||||
fmt.Printf("%s\n", version.FullVersion())
|
||||
os.Exit(0)
|
||||
}
|
||||
mainOpts, err := optionsFromEnvConfig()
|
||||
if err != nil {
|
||||
log.Fatal().Err(err).Msg("cmd/pomerium: settings error")
|
||||
}
|
||||
flag.Parse()
|
||||
if *debugFlag || mainOpts.Debug {
|
||||
log.SetDebugMode()
|
||||
}
|
||||
if mainOpts.LogLevel != "" {
|
||||
log.SetLevel(mainOpts.LogLevel)
|
||||
}
|
||||
if *versionFlag {
|
||||
fmt.Printf("%s", version.FullVersion())
|
||||
os.Exit(0)
|
||||
}
|
||||
log.Info().Str("version", version.FullVersion()).Str("user-agent", version.UserAgent()).Str("service", mainOpts.Services).Msg("cmd/pomerium")
|
||||
|
||||
grpcAuth := middleware.NewSharedSecretCred(mainOpts.SharedKey)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue