Azure / Azure/azure-devops-cli-extension

PowerShell output color gets stuck when there is an error

Open
#1,077 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
682
Forks
278
Avg merge
3d 23h
Merged PRs (30d)
3

Description

### **This is autogenerated. Please review and update as needed.**

## Describe the bug

**Command Name**
`az boards query
Extension Name: azure-devops. Version: 0.18.0.`

**Errors:**
In this case, there was a character error in a WIQL query, though I'm unsure what the issue actual was.

> Unable to encode the output with cp1252 encoding. Unsupported characters are discarded.

## To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

- Create any WIQL that will cause an error.
- `az boards query --wiql={}`

![Screenshot of PowerShell command in output within Windows Terminal, showing a white command prompt, a command with yellow error text, then a yellow command prompt.](https://user-images.githubusercontent.com/713665/102704561-477f6600-423a-11eb-8232-e2d9a9cdac2e.png)

## Expected Behavior

Running the query will cause an error, that is output in yellow.
The command prompt should be its normal color after that. Currently, though, it will be in yellow as well after the error output.

## Environment Summary
```
Windows-10-10.0.19041-SP0
Python 3.6.8
Installer: MSI

azure-cli 2.15.1 *

Extensions:
azure-devops 0.18.0

```
## Additional Context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.