Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Some commands change default console colors #907

Closed
skeeler opened this issue Nov 28, 2019 · 2 comments
Closed

[Bug] Some commands change default console colors #907

skeeler opened this issue Nov 28, 2019 · 2 comments
Assignees
Labels
Area: ProToCol The bugs under ProToCol Team bug

Comments

@skeeler
Copy link

skeeler commented Nov 28, 2019

Describe the bug
Some azure-devops CLI extension commands change the default console colors, specifically those that issue the statement: "This command group is in preview...". The problem is that subsequent console output (i.e. regular informational text, for example produced by Write-Output) is completely unreadable (black on black).

To Reproduce
Azure Cli Version: 2.0.76
Use az --version
Look for something like-
azure-cli (2.0.70)

Azure-Devops extension version: 0.15.0
Use az --version
Look for something like-
Extensions:
azure-devops (0.15.0)

Steps to reproduce the behavior:

  1. Open Visual Code integrated terminal for PowerShell Core 6
  2. login using az login or az devops login
  3. Run command "az boards iteration project list --depth 10 --org $orgUrl --project $projectName
  4. See "This command group is in preview..." message (blue on black text)
  5. Try typing another command in the integrated terminal (PowerShell Core) window, nothing is visible as the console colors for regular text are now black on black.

Expected behavior
The only way I've found to recover the proper console colors is to invoke the [Console]::ResetColor() method, but this is a hack and devops cli shouldn't be interfering with the Visual Code PS Core console colors in this way. Note that this only happens in the Visual Code (1.40.2) terminal/console window - the behavior is fine in a PowerShell Core 6 console window.

Screenshots
If applicable, add screenshots to help explain your problem.

Debug logs
Add the output of the command running it with debug mode (--debug)

Additional context
Add any other context about the problem here.

@skeeler skeeler added Area: ProToCol The bugs under ProToCol Team bug labels Nov 28, 2019
@atbagga atbagga self-assigned this Nov 29, 2019
@atbagga
Copy link
Collaborator

atbagga commented Nov 29, 2019

This behavior comes from Knack which is the base framework used by Azure-Cli and hence all the extensions on AzureCLI. So it should be a common issue for all extensions.

I could not repro it on my end let me raise an issue with them to see if someone has already reported it.

image

@atbagga
Copy link
Collaborator

atbagga commented Dec 3, 2019

@skeeler Thank you for reporting the issue.

The Knack team was able to repro the issue and the fix is in PR. You can check the above linked issue in Knack repo for the fix.

Note: Since this is coming from Knack/Azure-CLI, once the issue is fixed you will need to update azure-cli to get the fix (and not azure-devops).

I am closing this issue since it is getting tracked in the knack repo.

@atbagga atbagga closed this as completed Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: ProToCol The bugs under ProToCol Team bug
Projects
None yet
Development

No branches or pull requests

2 participants