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 #169

Closed
atbagga opened this issue Nov 29, 2019 · 1 comment
Closed

[Bug] Some commands change default console colors #169

atbagga opened this issue Nov 29, 2019 · 1 comment
Assignees

Comments

@atbagga
Copy link
Contributor

atbagga commented Nov 29, 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.

Reported by @skeeler here - Azure/azure-devops-cli-extension#907

@jiasli jiasli self-assigned this Dec 2, 2019
This was referenced Dec 2, 2019
@jiasli
Copy link
Member

jiasli commented Mar 24, 2020

Completed in #181. Color can now be disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants