mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
Honor global flags irrespective of the position. (#5486)
Flags like `json, config-dir, quiet` are now honored even if they are between minio and gateway in the cli, like, `minio --json gateway s3`. Fixes #5403
This commit is contained in:
@@ -156,13 +156,13 @@ func serverMain(ctx *cli.Context) {
|
||||
|
||||
// Get "json" flag from command line argument and
|
||||
// enable json and quite modes if jason flag is turned on.
|
||||
jsonFlag := ctx.Bool("json") || ctx.GlobalBool("json")
|
||||
jsonFlag := ctx.IsSet("json") || ctx.GlobalIsSet("json")
|
||||
if jsonFlag {
|
||||
log.EnableJSON()
|
||||
}
|
||||
|
||||
// Get quiet flag from command line argument.
|
||||
quietFlag := ctx.Bool("quiet") || ctx.GlobalBool("quiet")
|
||||
quietFlag := ctx.IsSet("quiet") || ctx.GlobalIsSet("quiet")
|
||||
if quietFlag {
|
||||
log.EnableQuiet()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user