Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Console] Only execute additional checks for color support if the output is a TTY#53576

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:5.4fromtheofidry:fix/color-detection-tty
Jan 19, 2024

Conversation

@theofidry
Copy link
Contributor

@theofidrytheofidry commentedJan 18, 2024
edited by chalasr
Loading

QA
Branch?5.4
Bug fix?yes
New feature?no
Deprecations?no
IssuesFix#53460
LicenseMIT

As reported in#53460, the modifications done in#52940 are incorrect as it results in detecting that the stream can support colors despite not being a TTY.

Rather than doing a simple revert which would re-introduce the pre-existing issue that#52940 attempted to fix, this PR checks if the output is a TTY based on Composer's code and does this check before anything else.

Indeed a TTY only means that colorsmay be supported, so the various checks that we were doing do make sense to be done but should be done after this TTY (soHyper is not an exception, it can be a TTY or not).

@fabpot
Copy link
Member

Thank you@theofidry.

@fabpotfabpot merged commit1c7c730 intosymfony:5.4Jan 19, 2024
@theofidrytheofidry deleted the fix/color-detection-tty branchJanuary 19, 2024 20:03
@chalasrchalasr changed the title[Console] Only execute additional checks for color support if the output[Console] Only execute additional checks for color support if the output is a TTYJan 21, 2024
This was referencedJan 30, 2024
fabpot added a commit that referenced this pull requestFeb 3, 2024
This PR was merged into the 5.4 branch.Discussion----------[Console] Fix color support for TTY output| Q             | A| ------------- | ---| Branch?       | 5.4| Bug fix?      | yes| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Issues        |Fix#53693| License       | MITPrior to#53576, the output being a TTY was sufficient to consider the output as supporting colors. This is not enough but as a result, we are missing some additional checks.This PR:- Adds a check for the `COLORTERM` environment variable. From what I've found it does not look this variable is ever set if there is no color support.- Adds a check for the `screen-*` `TERM` values. Similar to the check we already for `xterm`, you have `screen-256color`, `screen-256color-bce`, `screen.xterm-256color` or more.Commits-------22efcd0 [Console] Fix color support
symfony-splitter pushed a commit to symfony/console that referenced this pull requestFeb 3, 2024
This PR was merged into the 5.4 branch.Discussion----------[Console] Fix color support for TTY output| Q             | A| ------------- | ---| Branch?       | 5.4| Bug fix?      | yes| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Issues        | Fix #53693| License       | MITPrior tosymfony/symfony#53576, the output being a TTY was sufficient to consider the output as supporting colors. This is not enough but as a result, we are missing some additional checks.This PR:- Adds a check for the `COLORTERM` environment variable. From what I've found it does not look this variable is ever set if there is no color support.- Adds a check for the `screen-*` `TERM` values. Similar to the check we already for `xterm`, you have `screen-256color`, `screen-256color-bce`, `screen.xterm-256color` or more.Commits-------22efcd028b [Console] Fix color support
github-merge-queuebot pushed a commit to Lendable/composer-license-checker that referenced this pull requestFeb 4, 2024
[![MendRenovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)This PR contains the following updates:| Package | Change | Age | Adoption | Passing | Confidence ||---|---|---|---|---|---|| [symfony/console](https://symfony.com)([source](https://togithub.com/symfony/console)) | `6.4.2` -> `6.4.3` |[![age](https://developer.mend.io/api/mc/badges/age/packagist/symfony%2fconsole/6.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)|[![adoption](https://developer.mend.io/api/mc/badges/adoption/packagist/symfony%2fconsole/6.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)|[![passing](https://developer.mend.io/api/mc/badges/compatibility/packagist/symfony%2fconsole/6.4.2/6.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)|[![confidence](https://developer.mend.io/api/mc/badges/confidence/packagist/symfony%2fconsole/6.4.2/6.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)|| [symfony/process](https://symfony.com)([source](https://togithub.com/symfony/process)) | `6.4.2` -> `6.4.3` |[![age](https://developer.mend.io/api/mc/badges/age/packagist/symfony%2fprocess/6.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)|[![adoption](https://developer.mend.io/api/mc/badges/adoption/packagist/symfony%2fprocess/6.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)|[![passing](https://developer.mend.io/api/mc/badges/compatibility/packagist/symfony%2fprocess/6.4.2/6.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)|[![confidence](https://developer.mend.io/api/mc/badges/confidence/packagist/symfony%2fprocess/6.4.2/6.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)|---### Release Notes<details><summary>symfony/console (symfony/console)</summary>### [`v6.4.3`](https://togithub.com/symfony/console/releases/tag/v6.4.3)[CompareSource](https://togithub.com/symfony/console/compare/v6.4.2...v6.4.3)**Changelog**(symfony/console@v6.4.2...v6.4.3)- bug[symfony/symfony#53516](https://togithub.com/symfony/symfony/issues/53516)\[Console] Allow '0' as a $shortcut in InputOption.php([@&#8203;lawsonjl-ornl](https://togithub.com/lawsonjl-ornl))- bug[symfony/symfony#53576](https://togithub.com/symfony/symfony/issues/53576)\[Console] Only execute additional checks for color support if theoutput ([@&#8203;theofidry](https://togithub.com/theofidry))</details><details><summary>symfony/process (symfony/process)</summary>###[`v6.4.3`](https://togithub.com/symfony/process/compare/v6.4.2...v6.4.3)[CompareSource](https://togithub.com/symfony/process/compare/v6.4.2...v6.4.3)</details>---### Configuration📅 **Schedule**: Branch creation - At any time (no schedule defined),Automerge - At any time (no schedule defined).🚦 **Automerge**: Enabled.♻ **Rebasing**: Whenever PR becomes conflicted, or you tick therebase/retry checkbox.🔕 **Ignore**: Close this PR and you won't be reminded about theseupdates again.---- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, checkthis box---This PR has been generated by [MendRenovate](https://www.mend.io/free-developer-tools/renovate/). Viewrepository job log[here](https://developer.mend.io/github/Lendable/composer-license-checker).<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNTMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjE1My4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
github-merge-queuebot pushed a commit to Lendable/composer-license-checker that referenced this pull requestMar 2, 2024
[![MendRenovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)This PR contains the following updates:| Package | Change | Age | Adoption | Passing | Confidence ||---|---|---|---|---|---|| [symfony/console](https://symfony.com)([source](https://togithub.com/symfony/console)) | `6.4.4` -> `7.0.4` |[![age](https://developer.mend.io/api/mc/badges/age/packagist/symfony%2fconsole/7.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)|[![adoption](https://developer.mend.io/api/mc/badges/adoption/packagist/symfony%2fconsole/7.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)|[![passing](https://developer.mend.io/api/mc/badges/compatibility/packagist/symfony%2fconsole/6.4.4/7.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)|[![confidence](https://developer.mend.io/api/mc/badges/confidence/packagist/symfony%2fconsole/6.4.4/7.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)|| [symfony/process](https://symfony.com)([source](https://togithub.com/symfony/process)) | `6.4.4` -> `7.0.4` |[![age](https://developer.mend.io/api/mc/badges/age/packagist/symfony%2fprocess/7.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)|[![adoption](https://developer.mend.io/api/mc/badges/adoption/packagist/symfony%2fprocess/7.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)|[![passing](https://developer.mend.io/api/mc/badges/compatibility/packagist/symfony%2fprocess/6.4.4/7.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)|[![confidence](https://developer.mend.io/api/mc/badges/confidence/packagist/symfony%2fprocess/6.4.4/7.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)|---### Release Notes<details><summary>symfony/console (symfony/console)</summary>### [`v7.0.4`](https://togithub.com/symfony/console/releases/tag/v7.0.4)[CompareSource](https://togithub.com/symfony/console/compare/v7.0.3...v7.0.4)**Changelog**(symfony/console@v7.0.3...v7.0.4)- bug[symfony/symfony#54009](https://togithub.com/symfony/symfony/issues/54009)\[Console] Fix display of vertical Table on Windows OS([@&#8203;VincentLanglet](https://togithub.com/VincentLanglet))- bug[symfony/symfony#54001](https://togithub.com/symfony/symfony/issues/54001)\[Console] Fix display of Table on Windows OS([@&#8203;VincentLanglet](https://togithub.com/VincentLanglet))- bug[symfony/symfony#53707](https://togithub.com/symfony/symfony/issues/53707)\[Console] Fix color support for TTY output([@&#8203;theofidry](https://togithub.com/theofidry))- bug[symfony/symfony#53711](https://togithub.com/symfony/symfony/issues/53711)\[Console] Allow false as a $shortcut in InputOption([@&#8203;jayminsilicon](https://togithub.com/jayminsilicon))### [`v7.0.3`](https://togithub.com/symfony/console/releases/tag/v7.0.3)[CompareSource](https://togithub.com/symfony/console/compare/v7.0.2...v7.0.3)**Changelog**(symfony/console@v7.0.2...v7.0.3)- bug[symfony/symfony#53516](https://togithub.com/symfony/symfony/issues/53516)\[Console] Allow '0' as a $shortcut in InputOption.php([@&#8203;lawsonjl-ornl](https://togithub.com/lawsonjl-ornl))- bug[symfony/symfony#53576](https://togithub.com/symfony/symfony/issues/53576)\[Console] Only execute additional checks for color support if theoutput ([@&#8203;theofidry](https://togithub.com/theofidry))### [`v7.0.2`](https://togithub.com/symfony/console/releases/tag/v7.0.2)[CompareSource](https://togithub.com/symfony/console/compare/v7.0.1...v7.0.2)**Changelog**(symfony/console@v7.0.1...v7.0.2)- bug[symfony/symfony#52940](https://togithub.com/symfony/symfony/issues/52940)\[Console] Fix color support check on non-Windows platforms([@&#8203;theofidry](https://togithub.com/theofidry))- bug[symfony/symfony#52941](https://togithub.com/symfony/symfony/issues/52941)\[Console] Fix xterm detection([@&#8203;theofidry](https://togithub.com/theofidry))### [`v7.0.1`](https://togithub.com/symfony/console/releases/tag/v7.0.1)[CompareSource](https://togithub.com/symfony/console/compare/v7.0.0...v7.0.1)**Changelog**(symfony/console@v7.0.0...v7.0.1)-   no significant changes### [`v7.0.0`](https://togithub.com/symfony/console/releases/tag/v7.0.0)[CompareSource](https://togithub.com/symfony/console/compare/v6.4.4...v7.0.0)**Changelog**(symfony/console@v7.0.0-RC2...v7.0.0)-   no significant changes</details><details><summary>symfony/process (symfony/process)</summary>### [`v7.0.4`](https://togithub.com/symfony/process/releases/tag/v7.0.4)[CompareSource](https://togithub.com/symfony/process/compare/v7.0.3...v7.0.4)**Changelog**(symfony/process@v7.0.3...v7.0.4)- bug[symfony/symfony#54006](https://togithub.com/symfony/symfony/issues/54006)\[Process] Fix the `command -v` exception (@&#8203;kayw-geek)- bug[symfony/symfony#53821](https://togithub.com/symfony/symfony/issues/53821)\[Process] Fix Inconsistent Exit Status in proc_get_status for PHPVersions Below 8.3 ([@&#8203;Luc45](https://togithub.com/Luc45))### [`v7.0.3`](https://togithub.com/symfony/process/releases/tag/v7.0.3)[CompareSource](https://togithub.com/symfony/process/compare/v7.0.2...v7.0.3)**Changelog**(symfony/process@v7.0.2...v7.0.3)- bug[symfony/symfony#53481](https://togithub.com/symfony/symfony/issues/53481)\[Process] Fix executable finder when the command starts with a dash([@&#8203;kayw-geek](https://togithub.com/kayw-geek))### [`v7.0.2`](https://togithub.com/symfony/process/releases/tag/v7.0.2)[CompareSource](https://togithub.com/symfony/process/compare/v7.0.0...v7.0.2)**Changelog**(symfony/process@v7.0.1...v7.0.2)- bug[symfony/symfony#52864](https://togithub.com/symfony/symfony/issues/52864)\[HttpClient]\[Mailer]\[Process] always pass microseconds to usleep asintegers ([@&#8203;xabbuh](https://togithub.com/xabbuh))### [`v7.0.0`](https://togithub.com/symfony/process/releases/tag/v7.0.0)[CompareSource](https://togithub.com/symfony/process/compare/v6.4.4...v7.0.0)**Changelog**(symfony/process@v7.0.0-RC2...v7.0.0)-   no significant changes</details>---### Configuration📅 **Schedule**: Branch creation - At any time (no schedule defined),Automerge - At any time (no schedule defined).🚦 **Automerge**: Enabled.♻ **Rebasing**: Whenever PR becomes conflicted, or you tick therebase/retry checkbox.🔕 **Ignore**: Close this PR and you won't be reminded about theseupdates again.---- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, checkthis box---This PR has been generated by [MendRenovate](https://www.mend.io/free-developer-tools/renovate/). Viewrepository job log[here](https://developer.mend.io/github/Lendable/composer-license-checker).<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMjAuMiIsInVwZGF0ZWRJblZlciI6IjM3LjIyMC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@xabbuhxabbuhxabbuh approved these changes

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

4 participants

@theofidry@fabpot@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp