[Bug] Error: Command group 'pipelines variable-group' is in preview. It may be changed/removed in a future release
Describe the bug Following warning is reported as error in azure devops, while it should be warning. Command group 'pipelines variable-group' is in preview. It may be changed/removed in a future release
To Reproduce azure-cli (2.0.70) azure-devops (0.13.0)
Steps to reproduce the behavior:
- create new task in azure devops release pipeline
- run az pipelines variable-group list command
- see error
Expected behavior Following warning should be logged as warning.
@mildsar : can you please share the issue you are facing? This particular text 'This command group is in preview. It may be changed/removed in a future release.' is logged as a warning only.
Where are you facing error?
I face this issue when I run task in Azure DevOps with az pipelines variable-group list command. It is logged as warning when I run it locally on my PC, but in in Azure DevOps it is displayed as error with Red color, but logged as warning. See screenshot below:

@mildsar The Azure DevOps task might consider anything written to stderr as error depending on the settings (refer image below). The scripts should depend on the exit code rather than output to stderr for success/failure status.
The issue you are facing is azure-cli wide and not confined to azure-devops commands and I had filed a issue in knack for the same. You can visit that for more discussions/workarounds and updates on if the framework will change to fix this or you will have to update your scripts. Issue link - https://github.com/microsoft/knack/issues/166

@mildsar Closing the issue since this is now the accepted behavior in Azure CLI. You will have to handle your powershell script task in the Azure pipeline run to honor the behavior and fail on exit code rather than on stderr prints.
If you still feel there is a valid issue here please feel free to open a new issue.