From 14a0e6fc29092b8795a2e9a15e387b1d882a708b Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Thu, 7 Mar 2019 08:49:36 +0100 Subject: [PATCH] Remove dead code (#96) Environment variables will never contain booleans. They should only contain strings as all entries are converted to a string in the setter. --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 0477d30..e0fefce 100644 --- a/index.js +++ b/index.js @@ -17,9 +17,9 @@ if (hasFlag('no-color') || forceColor = 1; } if ('FORCE_COLOR' in env) { - if (env.FORCE_COLOR === true || env.FORCE_COLOR === 'true') { + if (env.FORCE_COLOR === 'true') { forceColor = 1; - } else if (env.FORCE_COLOR === false || env.FORCE_COLOR === 'false') { + } else if (env.FORCE_COLOR === 'false') { forceColor = 0; } else { forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);