[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#953527: [apt] colour highlighted error/warn labels



On Tue, 2020-03-24 at 21:16 +0100, Julian Andres Klode wrote:
> On Tue, Mar 24, 2020 at 08:09:24PM +0000, jnqnfe@gmail.com wrote:
> > Hi, Julian,
> > 
> > Thanks for adding the colour support in apt 2.0.1.
> > 
> > I'm curious though, most implementations use isatty() to determine
> > the
> > default colour control setting, which it seems that your
> > implementation
> > lacks, instead only outputting colour when explicitly enabled via
> > `-o
> > APT::Color=true`.
> > 
> > Was it a deliberate decision to not make use of isatty() to
> > determine a
> > default?
> 
> That's how it works, apt(8) sets APT::Color to true by default, and
> the
> code sets it to false if stdout is not a tty. Which it already did
> before,
> as you can see in apt list, for example.
> 
> As is customary, for compatibility reasons, apt-get(8) and apt-cache
> and 
> friends do not change behavior.

Oh, sorry. I saw no isatty() related change in a commit referenced from
the automatic 'pending' notification, and I did indeed try with apt-get 
rather than pure apt after updating which had no color by default, so
figured it must be missing. thanks.


Reply to: