Skip to content

Commit

Permalink
{Core} Fix --only-show-errors on root parser (#20353)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiasli committed Nov 17, 2021
1 parent b146ace commit 24bb8c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/azure-cli-core/azure/cli/core/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from knack.invocation import CommandInvoker
from knack.preview import ImplicitPreviewItem, PreviewItem, resolve_preview_info
from knack.experimental import ImplicitExperimentalItem, ExperimentalItem, resolve_experimental_info
from knack.log import get_logger
from knack.log import get_logger, CLILogging
from knack.util import CLIError, CommandResultItem, todict
from knack.events import EVENT_INVOKER_TRANSFORM_RESULT
from knack.validators import DefaultStr
Expand Down Expand Up @@ -562,7 +562,8 @@ def execute(self, args):
self.cli_ctx.raise_event(EVENT_INVOKER_CMD_TBL_LOADED, cmd_tbl=self.commands_loader.command_table,
parser=self.parser)

arg_check = [a for a in args if a not in ['--debug', '--verbose']]
arg_check = [a for a in args if a not in
(CLILogging.DEBUG_FLAG, CLILogging.VERBOSE_FLAG, CLILogging.ONLY_SHOW_ERRORS_FLAG)]
if not arg_check:
self.parser.enable_autocomplete()
subparser = self.parser.subparsers[tuple()]
Expand Down

0 comments on commit 24bb8c6

Please sign in to comment.