mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-13 15:14:08 +00:00
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 <julio.montes@intel.com>
This commit is contained in:
parent
6f2c036601
commit
68043b5ca6
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user