Skip to content

Commit

Permalink
Merge branch '3.4' into 4.4
Browse files Browse the repository at this point in the history
* 3.4:
  [Console] Do not check for "stty" using "exec" if that function is disabled
  • Loading branch information
nicolas-grekas committed Jul 1, 2020
2 parents b9354dc + 9f6acd5 commit 659699b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Symfony/Component/Console/Terminal.php
Expand Up @@ -66,6 +66,11 @@ public static function hasSttyAvailable()
return self::$stty;
}

// skip check if exec function is disabled
if (!\function_exists('exec')) {
return false;
}

exec('stty 2>&1', $output, $exitcode);

return self::$stty = 0 === $exitcode;
Expand Down

0 comments on commit 659699b

Please sign in to comment.