Skip to content

Commit

Permalink
fix: disable via NO_COLOR= usage (#39)
Browse files Browse the repository at this point in the history
* Fix `NO_COLOR` support

* colors: nullish

* kleur: nullish

Co-authored-by: Luke Edwards <luke.edwards05@gmail.com>
  • Loading branch information
stramel and lukeed committed Sep 26, 2020
1 parent b08ad63 commit ef5d4a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion colors.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if (typeof process !== 'undefined') {
}

export const $ = {
enabled: !NODE_DISABLE_COLORS && !NO_COLOR && TERM !== 'dumb' && (
enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== 'dumb' && (
FORCE_COLOR != null && FORCE_COLOR !== '0' || isTTY
)
}
Expand Down
2 changes: 1 addition & 1 deletion index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if (typeof process !== 'undefined') {
}

const $ = {
enabled: !NODE_DISABLE_COLORS && !NO_COLOR && TERM !== 'dumb' && (
enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== 'dumb' && (
FORCE_COLOR != null && FORCE_COLOR !== '0' || isTTY
),

Expand Down

0 comments on commit ef5d4a8

Please sign in to comment.