Dont start console service if MINIO_BROWSER=off (#20374)

By default, even if MINIO_BROWSER=off set code tries to get free
port available for the console. 

Signed-off-by: Shubhendu Ram Tripathi <shubhendu@minio.io>
This commit is contained in:
Shubhendu
2024-09-04 22:32:39 +05:30
committed by GitHub
parent 9b79eec29e
commit 6224849fd1
3 changed files with 33 additions and 20 deletions

View File

@@ -773,6 +773,9 @@ func serverMain(ctx *cli.Context) {
// Always load ENV variables from files first.
loadEnvVarsFromFiles()
// Handle early server environment vars
serverHandleEarlyEnvVars()
// Handle all server command args and build the disks layout
bootstrapTrace("serverHandleCmdArgs", func() {
err := buildServerCtxt(ctx, &globalServerCtxt)