diff --git a/src/Config.php b/src/Config.php index 577a023f84..a63df24c27 100644 --- a/src/Config.php +++ b/src/Config.php @@ -219,7 +219,10 @@ public function __set($name, $value) switch ($name) { case 'reportWidth' : // Support auto terminal width. - if ($value === 'auto' && preg_match('|\d+ (\d+)|', shell_exec('stty size 2>&1'), $matches) === 1) { + if ($value === 'auto' + && function_exists('shell_exec') === true + && preg_match('|\d+ (\d+)|', shell_exec('stty size 2>&1'), $matches) === 1 + ) { $value = (int) $matches[1]; } else { $value = (int) $value;