function Terminal::hasSttyAvailable
@internal
4 calls to Terminal::hasSttyAvailable()
- Application::doRunCommand in vendor/
symfony/ console/ Application.php - Runs the current command.
- QuestionHelper::doAsk in vendor/
symfony/ console/ Helper/ QuestionHelper.php - Asks the question to the user.
- QuestionHelper::getHiddenResponse in vendor/
symfony/ console/ Helper/ QuestionHelper.php - Gets a hidden response from user.
- Terminal::initDimensions in vendor/
symfony/ console/ Terminal.php
File
-
vendor/
symfony/ console/ Terminal.php, line 120
Class
Namespace
Symfony\Component\ConsoleCode
public static function hasSttyAvailable() : bool {
if (null !== self::$stty) {
return self::$stty;
}
// skip check if shell_exec function is disabled
if (!\function_exists('shell_exec')) {
return false;
}
return self::$stty = (bool) shell_exec('stty 2> ' . ('\\' === \DIRECTORY_SEPARATOR ? 'NUL' : '/dev/null'));
}