From 68043b5ca60dd3dbb304a09536b6c3519e5133ad Mon Sep 17 00:00:00 2001 From: Julio Montes Date: Mon, 28 Jan 2019 08:29:29 -0600 Subject: [PATCH] cli: set config options before showing config paths Config paths are set correctly but they must be set before handleShowConfig fixes #1185 Signed-off-by: Julio Montes --- cli/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/main.go b/cli/main.go index a01a02dc59..a021a0a775 100644 --- a/cli/main.go +++ b/cli/main.go @@ -250,6 +250,8 @@ func beforeSubcommands(c *cli.Context) error { var runtimeConfig oci.RuntimeConfig var err error + katautils.SetConfigOptions(name, defaultRuntimeConfiguration, defaultSysConfRuntimeConfiguration) + handleShowConfig(c) if userWantsUsage(c) || (c.NArg() == 1 && (c.Args()[0] == checkCmd)) { @@ -302,8 +304,6 @@ func beforeSubcommands(c *cli.Context) error { ignoreLogging = true } - katautils.SetConfigOptions(name, defaultRuntimeConfiguration, defaultSysConfRuntimeConfiguration) - configFile, runtimeConfig, err = katautils.LoadConfiguration(c.GlobalString(configFilePathOption), ignoreLogging, false) if err != nil { fatal(err)