Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
cli: set config options before showing config paths
Browse files Browse the repository at this point in the history
Config paths are set correctly but they must be set before handleShowConfig

fixes #1185

Signed-off-by: Julio Montes <[email protected]>
  • Loading branch information
Julio Montes authored and Eric Ernst committed Feb 26, 2019
1 parent 41b9093 commit 6c9325d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 6c9325d

Please sign in to comment.