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 committed Jan 28, 2019
1 parent 6f2c036 commit 68043b5
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 68043b5

Please sign in to comment.