FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

tty: improve color detection by BridgeAR · Pull Request #26264 · nodejs/node · GitHub

/ node Public

tty: improve color detection - #26264

Closed
BridgeAR wants to merge 2 commits into
nodejs:masterfrom
BridgeAR:improve-color-detection
Closed

tty: improve color detection#26264
BridgeAR wants to merge 2 commits into
nodejs:masterfrom
BridgeAR:improve-color-detection

Conversation

BridgeAR commented Feb 22, 2019
edited
Loading

Copy link
Copy Markdown
Member
  1. Using process.env.TERM = 'dumb' should never return any colors.
  2. process.env.TERM = 'terminator' supports 24 bit colors.
  3. Add support for process.env.TERM = 'rxvt-unicode-24bit'
  4. Hyper does not support true colors anymore. It should fall back
    to the xterm settings in regular cases.
  5. process.env.COLORTERM = 'truecolor' should return 24 bit colors.

Refs: #26261

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Copy link
Copy Markdown
Collaborator

@BridgeAR sadly an error occured when I tried to trigger a build :(

nodejs-github-bot added the tty Issues and PRs related to the tty subsystem. label Feb 22, 2019
BridgeAR mentioned this pull request Feb 22, 2019
3 tasks

Copy link
Copy Markdown
Member Author

BridgeAR added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Feb 28, 2019

BridgeAR commented Feb 28, 2019
edited
Loading

Copy link
Copy Markdown
Member Author

Resumed CI https://ci.nodejs.org/job/node-test-pull-request/21045/ ✅ (besides AIX)

Copy link
Copy Markdown
Member Author

1) Using `process.env.TERM = 'dumb'` should never return any colors.
2) `process.env.TERM = 'terminator'` supports 24 bit colors.
3) Add support for `process.env.TERM = 'rxvt-unicode-24bit'`
4) `Hyper` does not support true colors anymore. It should fall back
   to the xterm settings in regular cases.
5) `process.env.COLORTERM = 'truecolor'` should return 24 bit colors.
BridgeAR force-pushed the improve-color-detection branch from 63b7890 to 0f37b28 Compare February 28, 2019 20:30

Copy link
Copy Markdown
Member Author

I guess AIX uses a dumb terminal when running the pseudo-tty tests and therefore a test failed on AIX due to this change (https://ci.nodejs.org/job/node-test-commit-aix/21347/nodes=aix61-ppc64/testReport/junit/(root)/test/pseudo_tty_test_assert_colors/).

@nodejs/build it would be great if you could verify my suspicion.

@addaleax @Fishrock123 PTAL

CI https://ci.nodejs.org/job/node-test-pull-request/21058/

Copy link
Copy Markdown
Member

I guess AIX uses a dumb terminal when running the pseudo-tty tests and therefore a test failed on AIX due to this change (https://ci.nodejs.org/job/node-test-commit-aix/21347/nodes=aix61-ppc64/testReport/junit/(root)/test/pseudo_tty_test_assert_colors/).

https://ci.nodejs.org/job/node-test-commit-aix/21347/nodes=aix61-ppc64/injectedEnvVars/ lists TERM as dumb.

Copy link
Copy Markdown
Member Author

@richardlau thanks!

Copy link
Copy Markdown
Member

I guess AIX uses a dumb terminal when running the pseudo-tty tests and therefore a test failed on AIX due to this change (https://ci.nodejs.org/job/node-test-commit-aix/21347/nodes=aix61-ppc64/testReport/junit/(root)/test/pseudo_tty_test_assert_colors/).

https://ci.nodejs.org/job/node-test-commit-aix/21347/nodes=aix61-ppc64/injectedEnvVars/ lists TERM as dumb.

It might be dependent on which node in Jenkins was used. Paging through the jobs it looks like the jobs that ran on test-osuosl-aix61-ppc64_be-3, e.g. https://ci.nodejs.org/job/node-test-commit-aix/21348/nodes=aix61-ppc64/injectedEnvVars/, have TERM as xterm-256color but those that ran on the other two AIX nodes have TERM as dumb. I don't know where this would have been set up.

Copy link
Copy Markdown
Member Author

Copy link
Copy Markdown
Contributor

I am quite frankly surprised that pty even works on AIX...

BridgeAR commented Mar 1, 2019

Copy link
Copy Markdown
Member Author

@Fishrock123 @addaleax would you be so kind and just confirm your LG for the test changes?

BridgeAR added a commit to BridgeAR/node that referenced this pull request Mar 3, 2019
PR-URL: nodejs#26264
Refs: nodejs#26261
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
BridgeAR added a commit to BridgeAR/node that referenced this pull request Mar 3, 2019
1) Using `process.env.TERM = 'dumb'` should never return any colors.
2) `process.env.TERM = 'terminator'` supports 24 bit colors.
3) Add support for `process.env.TERM = 'rxvt-unicode-24bit'`
4) `Hyper` does not support true colors anymore. It should fall back
   to the xterm settings in regular cases.
5) `process.env.COLORTERM = 'truecolor'` should return 24 bit colors.

PR-URL: nodejs#26264
Refs: nodejs#26261
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

BridgeAR commented Mar 3, 2019

Copy link
Copy Markdown
Member Author

Landed in 7f2d2cd, f871c80

BridgeAR closed this Mar 3, 2019
BridgeAR added a commit that referenced this pull request Mar 4, 2019
PR-URL: #26264
Refs: #26261
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
BridgeAR added a commit that referenced this pull request Mar 4, 2019
1) Using `process.env.TERM = 'dumb'` should never return any colors.
2) `process.env.TERM = 'terminator'` supports 24 bit colors.
3) Add support for `process.env.TERM = 'rxvt-unicode-24bit'`
4) `Hyper` does not support true colors anymore. It should fall back
   to the xterm settings in regular cases.
5) `process.env.COLORTERM = 'truecolor'` should return 24 bit colors.

PR-URL: #26264
Refs: #26261
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
BridgeAR mentioned this pull request Mar 4, 2019
BridgeAR deleted the improve-color-detection branch January 20, 2020 11:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. tty Issues and PRs related to the tty subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL