diff --git a/source/vendor/supports-color/index.js b/source/vendor/supports-color/index.js index 265d7f8..91b9c63 100644 --- a/source/vendor/supports-color/index.js +++ b/source/vendor/supports-color/index.js @@ -81,6 +81,12 @@ function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) { } } + // If FORCE_COLOR is explicitly set, return it immediately + // to prevent terminal detection from overriding it + if (forceColor !== undefined) { + return forceColor; + } + // Check for Azure DevOps pipelines. // Has to be above the `!streamIsTTY` check. if ('TF_BUILD' in env && 'AGENT_NAME' in env) {