From 6209254cf8ed5ff1cd0c3a2027f0f3522ea759d0 Mon Sep 17 00:00:00 2001 From: Rasmus Schultz Date: Tue, 12 Apr 2022 09:51:10 +0200 Subject: [PATCH] I submitted a PR to `ansi-colors` proposing this change: https://github.com/doowb/ansi-colors/pull/54 --- src/ansi-colors.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ansi-colors.js b/src/ansi-colors.js index dea4fa7..d9e0856 100644 --- a/src/ansi-colors.js +++ b/src/ansi-colors.js @@ -13,11 +13,12 @@ const identity = val => val; const ANSI_REGEX = /[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g; const create = () => { - const colors = { enabled: true, visible: true, styles: {}, keys: {} }; - - // if ('FORCE_COLOR' in process.env) { - // colors.enabled = process.env.FORCE_COLOR !== '0'; - // } + const colors = { + enabled: process.env.FORCE_COLOR !== '0', + visible: true, + styles: {}, + keys: {} + }; const ansi = style => { let open = style.open = `\u001b[${style.codes[0]}m`;