-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Disable CLI color for Windows 10 greater than 10.0.10586 #19660
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what about: Windows != 10.0.10586 without Ansicon, ConEmu nor Mintty There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, for me There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for me There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since for you it's so relevant, I updated this PR 😉 |
||
* - non tty consoles | ||
* | ||
* @return bool true if the stream supports colorization, false otherwise | ||
|
@@ -94,7 +94,7 @@ protected function hasColorSupport() | |
{ | ||
if (DIRECTORY_SEPARATOR === '\\') { | ||
return | ||
0 >= version_compare('10.0.10586', PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD) | ||
0 === version_compare('10.0.10586', PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD) | ||
|| false !== getenv('ANSICON') | ||
|| 'ON' === getenv('ConEmuANSI') | ||
|| 'xterm' === getenv('TERM'); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to use version_compare anymore for an exact version match
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed: pull request updated, thanks