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 advanced terminal behavior when TERM is dumb #781
Comments
@iiroj I would assume that it, but I'm unsure. Nicely done with the quick fix! |
|
Now that I think about it, the right way to do this probably is to use supports-color itself to decide whether to force color support down the line: const supportsColor = require('supports-color');
if (supportsColor.stdout) {
process.env.FORCE_COLOR = supportsColor.stdout.level.toString();
} (Edit: Added |
Thanks for the tip, @tpope, I added it to the PR! It's a shame to add a new dependency, but then again it was already in via chalk. |
My reading of chalk's README is that you can use |
🎉 This issue has been resolved in version 10.0.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Fixes issue in tooling related to dumb terminals. Reference: [lint-staged/lint-staged#781](lint-staged/lint-staged#781)
Description
lint-staged
needs to respect whenTERM
isdumb
and output simple information. This fixes issues in applications / plugins likevim-fugitive
. An example is howchalk
respects this here: https://github.com/chalk/supports-color/blob/8a40054cdbcd3f42b4f68eaefb41c3064835b991/index.js#L65-L67Reference: tpope/vim-fugitive#1446
Steps to reproduce
Running:
Should output more simple information like:
Debug Logs
expand to view
Environment
lint-staged
: 10.0.1The text was updated successfully, but these errors were encountered: