Files
bun.sh/test/cli
Claude Bot 4f5db6d225 fix: disable ANSI colors for files and pipes by default
This commit fixes the ANSI color detection logic in `Output.enable_ansi_colors_stdout` and `Output.enable_ansi_colors_stderr` to ensure colors are disabled when output is redirected to a file or unix pipe, unless `FORCE_COLOR` is explicitly set.

The previous implementation had a subtle bug: when `isColorTerminal()` returned true AND either stdout OR stderr was a TTY, it would set `enable_color = true`. This caused both stdout and stderr to have colors enabled, even if one of them was redirected to a pipe or file.

The new implementation:
1. `FORCE_COLOR` environment variable - always enables colors
2. `NO_COLOR` environment variable - always disables colors
3. Color terminal detection - enables colors only for the specific stream that is a TTY
4. Default - disables colors for files and pipes (non-TTY)

Added comprehensive tests to verify the behavior across different scenarios including syntax errors, runtime errors, test output, and install output.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 18:11:52 +00:00
..
2025-10-11 08:23:25 -07:00
2025-11-14 16:49:21 -08:00
2025-11-01 20:17:56 -07:00