-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Weird output in powershell for commands tagged as preview. #12084
Description
az feedbackauto-generates most of the information requested below, as of CLI version 2.0.62
Describe the bug
When I run CLI preview commands in Powershell script, the output messed up. It returned a message "Command group is in preview. It may be changed/removed in a future release" as expected but followed by a black chunk. It looks like the command hanged but actually it has return value just not able to see it in terminal. When I copied and pasted to notepad, I can see the expected return value.
Also when I started virtual environment and removed is_preview=True for the same command, the problem resolved. So I believe the preview help message somehow changed the Powershell background color or font color to be invisible in terminal.
To Reproduce
Run any preview CLI commands in Powershell. For example:
$x = $(az appconfig list -g YourResourceGroup)
Write-Host $x
This issue only happened when I run in a standalone Powershell script. It worked fine in Powershell ISE.
Expected behavior
It should return properly instead of a black chunk.
Environment summary
Windows-10-10.0.18362-SP0
Python 3.6.6
Shell: cmd.exe (PowerShell Core 6.2.4 64-bit)
azure-cli 2.0.80
Additional context
None