mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
args: Honor config-dir & quiet wherever they are (#3356)
setGlobalsFromContext() is added to set global variables after parsing command line arguments. Thus, global flags will be honored wherever they are placed in minio command.
This commit is contained in:
committed by
Harshavardhana
parent
9ccfb70104
commit
01f625824a
@@ -363,8 +363,13 @@ func serverMain(c *cli.Context) {
|
||||
cli.ShowCommandHelpAndExit(c, "server", 1)
|
||||
}
|
||||
|
||||
// Set global quiet flag.
|
||||
globalQuiet = c.Bool("quiet") || c.GlobalBool("quiet")
|
||||
// Set global variables after parsing passed arguments
|
||||
setGlobalsFromContext(c)
|
||||
|
||||
// Initialization routine, such as config loading, enable logging, ..
|
||||
minioInit()
|
||||
|
||||
checkUpdate()
|
||||
|
||||
// Server address.
|
||||
serverAddr := c.String("address")
|
||||
|
||||
Reference in New Issue
Block a user