Skip to content

[3.6] backport #6503 (status line fix) - #6556

Merged
emillon merged 1 commit into
ocaml:3.6from
emillon:backport-3.6-6503
Nov 24, 2022
Merged

emillon merged 1 commit into
ocaml:3.6from
emillon:backport-3.6-6503

Conversation

@emillon

@emillon emillon commented Nov 24, 2022

Copy link
Copy Markdown
Collaborator

We want to enable the status line if and only if stderr is a tty. ANSI
color usage was tweaked in 3.6.0 with #6340 to allow users to force
colors. As status line activation actually depended on whether ANSI
colors were enabled or not, this change had the side effect to always
enable the status line even when ANSI colors were requested for
something that's not a tty.

Fix this by exposing a simple lazy wrapper of Unix.isatty to use
instead of Ansi_color.stderr_supports_color.

Signed-off-by: Antonin Décimo [email protected]

We want to enable the status line if and only if stderr is a tty. ANSI
color usage was tweaked in 3.6.0 with ocaml#6340 to allow users to force
colors. As status line activation actually depended on whether ANSI
colors were enabled or not, this change had the side effect to always
enable the status line even when ANSI colors were requested for
something that's not a tty.

Fix this by exposing a simple lazy wrapper of Unix.isatty to use
instead of Ansi_color.stderr_supports_color.

Signed-off-by: Antonin Décimo <[email protected]>
@emillon emillon added this to the 3.6.1 milestone Nov 24, 2022
@emillon
emillon merged commit a133f52 into ocaml:3.6 Nov 24, 2022
@emillon
emillon deleted the backport-3.6-6503 branch November 24, 2022 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants