-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Related command
az (applies to any command)
Is your feature request related to a problem? Please describe.
It kind of is related to issues like #29640. In that particular case, the CLI will work properly. However, on each invocation, there is output to STDERR. This output is not helpful for the execution of the CLI itself at all. Instead, it just clutters the screen, making the actual output harder to read in some cases.
In addition to that, it might fail pipelines.
Describe the solution you'd like
As a default, az should suppress warnings, to keep the output clean.
Original az invocation (via /usr/sbin/az):
/opt/azure-cli/bin/python -m azure.cli "$@"
Proposed change:
/opt/azure-cli/bin/python -W ignore -m azure.cli "$@"
Describe alternatives you've considered
One could consider adding 2> /dev/null to every invocation, but that supresses legit output to STDERR as well and therefore is no real alternative.
Don't know enough about Python, but packaging the cli with the runtime environment comes to mind.
Additional context