mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-29 19:24:23 +01:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user