From bf2b8879b7227efd998f1722b524e8d90b4c78fc Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sun, 15 Jan 2017 16:53:01 -0800 Subject: [PATCH] config: Allow non-standard config dir to be configured with SSL. (#3583) --- cmd/globals.go | 4 +--- cmd/main.go | 7 +++++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cmd/globals.go b/cmd/globals.go index 419886e00..1257b68f6 100644 --- a/cmd/globals.go +++ b/cmd/globals.go @@ -129,9 +129,7 @@ func setGlobalsFromContext(c *cli.Context) { if globalConfigDir == "" { console.Fatalf("Unable to get config file. Config directory is empty.") } + // Set global quiet flag. globalQuiet = c.Bool("quiet") || c.GlobalBool("quiet") - - // Is TLS configured?. - globalIsSSL = isSSL() } diff --git a/cmd/main.go b/cmd/main.go index 02f672613..4864b7c7b 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -165,11 +165,14 @@ func checkUpdate() { // Generic Minio initialization to create/load config, prepare loggers, etc.. func minioInit(ctx *cli.Context) { + // Sets new config directory. + setGlobalConfigPath(globalConfigDir) + // Set global variables after parsing passed arguments setGlobalsFromContext(ctx) - // Sets new config directory. - setGlobalConfigPath(globalConfigDir) + // Is TLS configured?. + globalIsSSL = isSSL() // Migrate any old version of config / state files to newer format. migrate()