You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
src/becwright/cli.py defines ANSI color constants unconditionally (RED = "\033[91m", etc.) and always emits them. When becwright check output is piped to a file or another tool, raw escape codes leak in, and the NO_COLOR convention is ignored. (The --json output is unaffected — this is about the human-readable output.)
Proposal
Disable colors when either:
the NO_COLOR environment variable is set, or
stdout is not a TTY (sys.stdout.isatty() is false).
Optionally add an explicit --no-color flag. Simplest implementation: set the color constants to empty strings in those cases.
Acceptance criteria
becwright check | cat and NO_COLOR=1 becwright check emit no escape sequences.
A test asserts this (e.g. capsys + monkeypatching isatty).
Files: src/becwright/cli.py (color constants near the top, _print_result).
Activity