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

Node.js tools doesn't use color outputs because of wrong TTY detection #218

Closed
1 of 5 tasks
ai opened this issue Dec 31, 2019 · 6 comments
Closed
1 of 5 tasks

Node.js tools doesn't use color outputs because of wrong TTY detection #218

ai opened this issue Dec 31, 2019 · 6 comments

Comments

@ai
Copy link

ai commented Dec 31, 2019

Describe the bug

chalk is the most popular tool for color output in the Node.js ecosystem. Unfortunately, it can’t detect that GitHub Actions support color and use colorless output.

I created an issue and we found that Node.js does not detect TTY on stdout.

process.stdout.isTTY //=> undefined

As a result, we have less readable output in all npm tools.

Area for Triage: JavaScript and Node.js

Question, Bug, or Feature?: Bug

Virtual environments affected

  • macOS 10.15
  • Ubuntu 16.04 LTS
  • Ubuntu 18.04 LTS
  • Windows Server 2016 R2
  • Windows Server 2019

Expected behavior

Color output for chalk based tools.

Actual behavior

  1. Create empty index.js
  2. Add npx size-limit index.js step
  3. Check step output on the website: it has no colors.
@ai
Copy link
Author

ai commented Dec 31, 2019

Auto assigning script was failed, so I will mention people manually. Sorry if I will mention somebody wrong:

@leantk @vijayma @bryanmacfarlane

@arcanis
Copy link

arcanis commented Dec 31, 2019

Yarn 2 is currently impacted as well. I'll use a workaround in the meantime, but I'll monitor these issues to add the right fix when possible 🙂

@bryanmacfarlane
Copy link
Member

This may be an issue for actions/runner. @TingluoHuang and @dakale , is that correct?

@TingluoHuang
Copy link
Member

@bryanmacfarlane yes, I think the issue already tracked
actions/runner#241

@kaylangan
Copy link
Contributor

Closing in favor of tracking in actions/runner#241

@kirillgroshkov
Copy link

Jest doesn't output colors too

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

6 participants