From ae776c6b3525190d413774f0b424eb0d47b18f06 Mon Sep 17 00:00:00 2001 From: Apoorv Deshmukh Date: Mon, 9 Jan 2023 16:50:32 +0530 Subject: [PATCH] Check sub-command for modernCLI only if specified --- cmd/modern/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/modern/main.go b/cmd/modern/main.go index 9ff912d1..a4c9ea13 100644 --- a/cmd/modern/main.go +++ b/cmd/modern/main.go @@ -49,7 +49,7 @@ func main() { // isFirstArgModernCliSubCommand is TEMPORARY code, to be removed when // we remove the Kong based CLI func isFirstArgModernCliSubCommand() (isNewCliCommand bool) { - if len(os.Args) > 0 { + if len(os.Args) > 1 { if rootCmd.IsValidSubCommand(os.Args[1]) { isNewCliCommand = true }