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

Re: [Libguestfs] [PATCH] Don't display a progress bar if stderr isn't on a tty

On Thu, Jan 20, 2011 at 05:22:28PM +0000, Matthew Booth wrote:
> Apart from being a good idea, this works round an apparent bug in either
> Term::ProgressBar or Term::ReadKey which seems to result in an attempt to write
> an exceptionally long progress bar.
> Fixes RHBZ#671083


I'm a bit surprised that the progress bar is sent to STDERR by default
(the default in Term::ProgressBar).

For reference, similar code is used in guestfish except we check if
stdin is a tty not stderr, and we output to stdout:



Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org

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