unjs / std-env

Runtime Agnostic JS utils
MIT License
459 stars 25 forks source link

fix(isColorSupported): inverted condition for `TERM=dumb` #97

Closed NamesMT closed 10 months ago

NamesMT commented 10 months ago

๐Ÿ”— Linked issue

โ“ Type of change

๐Ÿ“š Description

Currently our condition checks for !!TERM=dumb, which means isColorSupported will be set to true for terminal that doesn't support color, and vice-versa, isColorSupported is false for supported terminals,
this corrects the behavior.

Ref: https://www.npmjs.com/package/color-support

Note: Should it be a breaking change?

๐Ÿ“ Checklist