runtime/cli: fix TestMainBeforeSubCommandsLoadConfigurationFail failure

Now that it is `kata-config`...

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
Peng Tao 2021-03-23 16:40:38 +08:00
parent 8e71c4fc7a
commit 9b689ea1d7

View File

@ -86,8 +86,8 @@ var defaultErrorFile = os.Stderr
// runtimeFlags is the list of supported global command-line flags
var runtimeFlags = []cli.Flag{
cli.StringFlag{
Name: "config, kata-config",
Usage: project + " config file path",
Name: "config, kata-config",
Usage: project + " config file path",
},
cli.StringFlag{
Name: "log",
@ -110,8 +110,8 @@ var runtimeFlags = []cli.Flag{
Usage: "ignore cgroup permission errors ('true', 'false', or 'auto')",
},
cli.BoolFlag{
Name: "show-default-config-paths, kata-show-default-config-paths",
Usage: "show config file paths that will be checked for (in order)",
Name: "show-default-config-paths, kata-show-default-config-paths",
Usage: "show config file paths that will be checked for (in order)",
},
cli.BoolFlag{
Name: "systemd-cgroup",
@ -322,7 +322,7 @@ func beforeSubcommands(c *cli.Context) error {
}
}
configFile, runtimeConfig, err = katautils.LoadConfiguration(c.GlobalString("config"), ignoreConfigLogs, false)
configFile, runtimeConfig, err = katautils.LoadConfiguration(c.GlobalString("kata-config"), ignoreConfigLogs, false)
if err != nil {
fatal(err)
}