From 52224b2e48a00d247ca8b2f4cbc17cc859c19c9a Mon Sep 17 00:00:00 2001 From: jiasli <4003950+jiasli@users.noreply.github.com> Date: Tue, 16 Nov 2021 14:17:28 +0800 Subject: [PATCH] only-show-errors --- src/azure-cli-core/azure/cli/core/commands/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/azure-cli-core/azure/cli/core/commands/__init__.py b/src/azure-cli-core/azure/cli/core/commands/__init__.py index 169fcdc01d4..1a2c2debe0e 100644 --- a/src/azure-cli-core/azure/cli/core/commands/__init__.py +++ b/src/azure-cli-core/azure/cli/core/commands/__init__.py @@ -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 @@ -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()]