From 792487868c9a11594eaef9b819ea9b2ab82abe60 Mon Sep 17 00:00:00 2001 From: Maciej Holyszko <14310995+falkenhawk@users.noreply.github.com> Date: Mon, 5 Dec 2022 13:29:20 +0100 Subject: [PATCH] fix "stty: 'standard input': Inappropriate ioctl for device" spam (#155) --- .../library/Zend/ProgressBar/Adapter/Console.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/zend-progressbar/library/Zend/ProgressBar/Adapter/Console.php b/packages/zend-progressbar/library/Zend/ProgressBar/Adapter/Console.php index 9f9651e8e..cb5eff303 100644 --- a/packages/zend-progressbar/library/Zend/ProgressBar/Adapter/Console.php +++ b/packages/zend-progressbar/library/Zend/ProgressBar/Adapter/Console.php @@ -243,9 +243,9 @@ public function setWidth($width = null) $this->_width = 80; // Try to determine the width through stty - if (preg_match('#\d+ (\d+)#', @shell_exec('stty size'), $match) === 1) { + if (preg_match('#\d+ (\d+)#', @shell_exec('stty size 2>/dev/null'), $match) === 1) { $this->_width = (int) $match[1]; - } else if (preg_match('#columns = (\d+);#', @shell_exec('stty'), $match) === 1) { + } else if (preg_match('#columns = (\d+);#', @shell_exec('stty 2>/dev/null'), $match) === 1) { $this->_width = (int) $match[1]; } }