diff options
Diffstat (limited to 'urpm/download.pm')
-rw-r--r-- | urpm/download.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/urpm/download.pm b/urpm/download.pm index c6800f73..c21caeca 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -815,11 +815,13 @@ END { #- get the width of the terminal my $wchar = 79; -eval { +if (-t STDOUT) { + eval { require Term::ReadKey; ($wchar) = Term::ReadKey::GetTerminalSize(); --$wchar; -}; + }; +} sub progress_text { my ($mode, $percent, $total, $eta, $speed) = @_; |