From a910495c1ff20ace1906fb101ca9750fe0c9a8ac Mon Sep 17 00:00:00 2001 From: hungtd Date: Tue, 10 Jan 2023 11:25:07 +0700 Subject: [PATCH] fix "stty: 'standard input': Inappropriate ioctl for device" spam --- library/Zend/ProgressBar/Adapter/Console.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/Zend/ProgressBar/Adapter/Console.php b/library/Zend/ProgressBar/Adapter/Console.php index dc62d27dd5..d7eb911841 100644 --- a/library/Zend/ProgressBar/Adapter/Console.php +++ b/library/Zend/ProgressBar/Adapter/Console.php @@ -239,9 +239,9 @@ public function setWidth($width = null) $this->_width = 80; // Try to determine the width through stty - if (preg_match('#\d+ (\d+)#', (string) @shell_exec('stty size'), $match) === 1) { + if (preg_match('#\d+ (\d+)#', (string) @shell_exec('stty size 2>/dev/null'), $match) === 1) { $this->_width = (int) $match[1]; - } else if (preg_match('#columns = (\d+);#', (string) @shell_exec('stty'), $match) === 1) { + } else if (preg_match('#columns = (\d+);#', (string) @shell_exec('stty 2>/dev/null'), $match) === 1) { $this->_width = (int) $match[1]; } }