Skip to content

Commit 29f00eb

Browse files
add --only-show-errors flag to Azure CLI command to suppress welcome banner and info messages
1 parent e4acde2 commit 29f00eb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

content-gen/scripts/post_deploy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ def print_warning(text: str):
102102

103103
def run_az_command(args: List[str], capture_output: bool = True) -> subprocess.CompletedProcess:
104104
"""Run an Azure CLI command."""
105-
cmd = ["az"] + args
105+
# Add --only-show-errors to suppress the welcome banner and info messages
106+
cmd = ["az", "--only-show-errors"] + args
106107
# shell=True required on Windows to find az.cmd
107108
return subprocess.run(cmd, capture_output=capture_output, text=True, shell=True)
108109

0 commit comments

Comments
 (0)