Skip to content

Commit

Permalink
Remove dead code (#96)
Browse files Browse the repository at this point in the history
Environment variables will never contain booleans. They should only contain strings as all entries are converted to a string in the setter.
  • Loading branch information
BridgeAR authored and sindresorhus committed Mar 7, 2019
1 parent 8c160eb commit 14a0e6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 14a0e6f

Please sign in to comment.