mirror of
https://github.com/gomods/athens
synced 2026-02-03 11:00:32 +00:00
Invoke envOverrides before checkFilePerms (#1441)
* Invoke envOverrides before checkFilePerms * Reverts changes to cmd/proxy/Dockerfile
This commit is contained in:
committed by
Marwan Sulaiman
parent
402264a8f3
commit
db84b52159
@@ -190,6 +190,11 @@ func ParseConfigFile(configFile string) (*Config, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// override values with environment variables if specified
|
||||
if err := envOverride(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Check file perms from config
|
||||
if config.GoEnv == "production" {
|
||||
if err := checkFilePerms(configFile, config.FilterFile); err != nil {
|
||||
@@ -197,11 +202,6 @@ func ParseConfigFile(configFile string) (*Config, error) {
|
||||
}
|
||||
}
|
||||
|
||||
// override values with environment variables if specified
|
||||
if err := envOverride(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// validate all required fields have been populated
|
||||
if err := validateConfig(config); err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user