init: Honor config-dir flag when it is passed as global or local flag (#3337)

setGlobalsFromContext() is added to sets global variable after parsing
command line arguments.
This commit is contained in:
Anis Elleuch
2016-11-24 02:13:40 +01:00
committed by Harshavardhana
parent d711ff454e
commit e2ef95af7d
5 changed files with 89 additions and 64 deletions
+4
View File
@@ -44,6 +44,10 @@ func mainVersion(ctx *cli.Context) {
cli.ShowCommandHelpAndExit(ctx, "version", 1)
}
setGlobalsFromContext(ctx)
checkUpdate()
console.Println("Version: " + Version)
console.Println("Release-Tag: " + ReleaseTag)
console.Println("Commit-ID: " + CommitID)