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

Disable CLI color for Windows 10 greater than 10.0.10586 #19660

Closed
wants to merge 3 commits into from

Conversation

mlocati
Copy link
Contributor

@mlocati mlocati commented Aug 18, 2016

Q A
Branch? master
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #19520
License MIT
Doc PR

The command prompt in Windows 10.0.10586 had enabled color support by default.
But in the next Windows versions they disabled it (reference): every exe now needs to explicitly turn on the color support.

I already asked the PHP dev team to enable it for php.exe, but they said they are busy for now.

So, let's turn off colors for Windows, until we'll have new PHP versions with color support enabled.

@@ -85,7 +85,7 @@ protected function doWrite($message, $newline)
*
* Colorization is disabled if not supported by the stream:
*
* - Windows before 10.0.10586 without Ansicon, ConEmu or Mintty
* - Windows not 10.0.10586 without Ansicon, ConEmu or Mintty
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about: Windows != 10.0.10586 without Ansicon, ConEmu nor Mintty

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, for me != and not are synonymous...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for me != means "different than", which reads better imho than "not"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since for you it's so relevant, I updated this PR 😉

@nicolas-grekas
Copy link
Member

👍
Status: reviewed

@nicolas-grekas
Copy link
Member

Thank you @mlocati.

nicolas-grekas added a commit that referenced this pull request Aug 19, 2016
…mlocati)

This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #19660).

Discussion
----------

Disable CLI color for Windows 10 greater than 10.0.10586

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19520
| License       | MIT
| Doc PR        |

The command prompt in Windows 10.0.10586 had enabled color support by default.
But in the next Windows versions they disabled it ([reference](https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/15617610--re-enable-enable-virtual-terminal-processing-by)): every exe now needs to explicitly turn on the color support.

I [already asked](https://bugs.php.net/bug.php?id=72768) the PHP dev team to enable it for php.exe, but they said they are busy for now.

So, let's turn off colors for Windows, until we'll have new PHP versions with color support enabled.

Commits
-------

255c59f Disable CLI color for Windows 10 greater than 10.0.10586
@mlocati mlocati deleted the disable-windows-cli-colors branch August 19, 2016 07:07
This was referenced Sep 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants