cli: Remove kata- prefix from env and check subcommands

Provide the subcommands `kata-env` and `kata-check` as `env` and `check`
respectively.

Fixes #1011

Signed-off-by: Daniel Knittl-Frank <knittl89+git@googlemail.com>

fixup! cli: Add aliases to kata-env and kata-check commands
This commit is contained in:
Daniel Knittl-Frank
2020-10-24 12:10:59 +02:00
parent 063e8bd801
commit c5d355e1ff
4 changed files with 22 additions and 24 deletions

View File

@@ -272,7 +272,7 @@ func beforeSubcommands(c *cli.Context) error {
ignoreConfigLogs := false
var traceRootSpan string
subCmdIsCheckCmd := (c.NArg() >= 1 && (c.Args()[0] == checkCmd))
subCmdIsCheckCmd := (c.NArg() >= 1 && ((c.Args()[0] == "kata-check") || (c.Args()[0] == "check")))
if subCmdIsCheckCmd {
// checkCmd will use the default logrus logger to stderr
// raise the logger default level to warn
@@ -313,7 +313,7 @@ func beforeSubcommands(c *cli.Context) error {
// (meaning any spans created at this point will be silently ignored).
setExternalLoggers(context.Background(), kataLog)
if c.NArg() == 1 && c.Args()[0] == envCmd {
if c.NArg() == 1 && (c.Args()[0] == "kata-env" || c.Args()[0] == "env") {
// simply report the logging setup
ignoreConfigLogs = true
}