mirror of
https://github.com/minio/minio.git
synced 2025-01-12 07:23:23 -05:00
fix: always load ENVs from files first as soon as server starts (#18247)
This is a regression from #18231, however reading from ENV files must happen well before any parsing logic is invoked.
This commit is contained in:
parent
a2312028b9
commit
edfb310a59
@ -619,8 +619,6 @@ func loadEnvVarsFromFiles() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func handleCommonEnvVars() {
|
func handleCommonEnvVars() {
|
||||||
loadEnvVarsFromFiles()
|
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
globalBrowserEnabled, err = config.ParseBool(env.Get(config.EnvBrowser, config.EnableOn))
|
globalBrowserEnabled, err = config.ParseBool(env.Get(config.EnvBrowser, config.EnableOn))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -579,6 +579,9 @@ func serverMain(ctx *cli.Context) {
|
|||||||
|
|
||||||
setDefaultProfilerRates()
|
setDefaultProfilerRates()
|
||||||
|
|
||||||
|
// Always load ENV variables from files first.
|
||||||
|
loadEnvVarsFromFiles()
|
||||||
|
|
||||||
// Handle all server command args.
|
// Handle all server command args.
|
||||||
bootstrapTrace("serverHandleCmdArgs", func() {
|
bootstrapTrace("serverHandleCmdArgs", func() {
|
||||||
serverHandleCmdArgs(ctx)
|
serverHandleCmdArgs(ctx)
|
||||||
|
Loading…
Reference in New Issue
Block a user