diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-09-03 09:43:21 -0400 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-09-03 09:44:29 -0400 |
commit | 3c7fca264ec9f85667c9bcaa19e5d9075b8664b8 (patch) | |
tree | c1e6ca150caa6eec62a1a97653502b3575d8c6e1 /urpm/install.pm | |
parent | 82678294c9064f6093610a7ea062d202ba621fdf (diff) | |
download | urpmi-3c7fca264ec9f85667c9bcaa19e5d9075b8664b8.tar urpmi-3c7fca264ec9f85667c9bcaa19e5d9075b8664b8.tar.gz urpmi-3c7fca264ec9f85667c9bcaa19e5d9075b8664b8.tar.bz2 urpmi-3c7fca264ec9f85667c9bcaa19e5d9075b8664b8.tar.xz urpmi-3c7fca264ec9f85667c9bcaa19e5d9075b8664b8.zip |
fix Term::ReadKey warnings when redirected
Diffstat (limited to 'urpm/install.pm')
-rw-r--r-- | urpm/install.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/urpm/install.pm b/urpm/install.pm index 08e43236..d4b83706 100644 --- a/urpm/install.pm +++ b/urpm/install.pm @@ -21,12 +21,14 @@ urpm::install - Package installation transaction routines for urpmi # size of the installation progress bar my $progress_size = 45; -eval { +if (-t STDOUT) { + eval { require Term::ReadKey; ($progress_size) = Term::ReadKey::GetTerminalSize(); $progress_size -= 35; $progress_size < 5 and $progress_size = 5; -}; + }; +} sub _hash_intersect_list { |