You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-11-25 22:32:57 +02:00
test/fix environment var parsing
This commit is contained in:
4
main.go
4
main.go
@@ -48,14 +48,14 @@ func main() {
|
||||
|
||||
opts := NewOptions()
|
||||
|
||||
var cfg map[string]interface{}
|
||||
cfg := make(EnvOptions)
|
||||
if *config != "" {
|
||||
_, err := toml.DecodeFile(*config, &cfg)
|
||||
if err != nil {
|
||||
log.Fatalf("ERROR: failed to load config file %s - %s", *config, err)
|
||||
}
|
||||
}
|
||||
LoadOptionsFromEnv(opts, cfg)
|
||||
cfg.LoadEnvForStruct(opts)
|
||||
options.Resolve(opts, flagSet, cfg)
|
||||
|
||||
err := opts.Validate()
|
||||
|
||||
Reference in New Issue
Block a user