Skip to content

[Bug]: Playwright workers force ANSI colors via FORCE_COLOR=1, breaking color-disable behavior in CI/CD #40006

@veged

Description

@veged

Version

@playwright/test 1.58.2

Steps to reproduce

@playwright/test 1.58.2 (also reproducible on current main source where workerHost.ts still sets FORCE_COLOR: '1')

  1. Set CI no-color env in parent process, for example:
    • CI=1
    • FORCE_COLOR=0
    • NO_COLOR=1 (or just FORCE_COLOR=0)
  2. Run Playwright tests with a worker-based run:
    • npx playwright test --reporter=dot
  3. Log env in test config (or worker-side) and compare parent vs worker process values.
  4. Observe source behavior in worker bootstrap:

Expected behavior

Actual behavior

Environment

Если хочешь, сразу дам ещё ultra-short вариант (совсем компактный, без лишнего текста) для вставки в issue form.

Expected behavior

Playwright workers should respect user/CI color settings inherited from parent process (e.g. keep FORCE_COLOR=0 when explicitly set), or at least not override them unconditionally.

Actual behavior

Parent process starts with FORCE_COLOR=0, but Playwright worker processes are started with FORCE_COLOR=1 due to hardcoded env in workerHost.ts. This re-enables colored output in CI and can conflict with no-color setups.

Additional context

No response

Environment

- Playwright: `@playwright/test 1.58.2`
- OS: Linux CI runner
- Node.js: `v24.14.1`
- CI env: `CI=1`, `FORCE_COLOR=0`, `PLAYWRIGHT_FORCE_TTY=0` (and in some setups `NO_COLOR=1`)
- Reporter: `dot`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions