Skip to content

Commit

Permalink
Support --only-show-errors (#12544)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiasli authored Mar 16, 2020
1 parent 54aba72 commit f0ac2de
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/azure-cli-core/azure/cli/core/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,10 +722,11 @@ def _resolve_preview_and_deprecation_warnings(self, cmd, parsed_args):
del preview_kwargs['_get_message']
previews.append(ImplicitPreviewItem(**preview_kwargs))

for d in deprecations:
print(d.message, file=sys.stderr)
for p in previews:
print(p.message, file=sys.stderr)
if not self.cli_ctx.only_show_errors:
for d in deprecations:
print(d.message, file=sys.stderr)
for p in previews:
print(p.message, file=sys.stderr)

def _resolve_extension_override_warning(self, cmd): # pylint: disable=no-self-use
if isinstance(cmd.command_source, ExtensionCommandSource) and cmd.command_source.overrides_command:
Expand Down

0 comments on commit f0ac2de

Please sign in to comment.