[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#29359] [PATCH 08/31] gnu: Add java-jansi.
From: |
Tobias Geerinckx-Rice |
Subject: |
[bug#29359] [PATCH 08/31] gnu: Add java-jansi. |
Date: |
Fri, 24 Nov 2017 16:31:20 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
Julien,
On Wed, Nov 22, 2017 at 10:33:56AM +0100, julien lepiller wrote:
> There's a small issue with this package: when it runs its tests, it
> will output formatted text with colors but forgets to clean the
> console afterwards, which leaves the console with a bold red font.> Any idea
> on how to clean that?
You could add a reset-terminal phase after the test phase that sends an
ANSI reset sequence. Either by invoking the ‘reset’ command, which would
add a dependency on ncurses and is probably overkill, or by sending
(from memory, so check) \e[0m which resets only colour and weight and is
probably all you need here.
> Shouldn't the environment block this kind of thing?
The problem is that the state modified by these escape sequences is in
the terminal itself.
We could filter build output through a sanitiser that strips or mangles
those sequences so we only print ‘plain text’ to the terminal (while
keeping them in logs — I'm sure some source-based package managers do
just that). I don't know if that would break some tests, though.
Kind regards,
T G-R