GNU bug report logs -
#29359
More java packages
Previous Next
Full log
View this message in rfc822 format
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
This bug report was last modified 7 years and 101 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.