Skip to content

Commit

Permalink
bugfix: the terminal state was wrong and not reseted
Browse files Browse the repository at this point in the history
  • Loading branch information
Amrouche Hamza committed Apr 6, 2019
1 parent d45ecef commit 485d2bb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions src/Symfony/Component/Console/Helper/QuestionHelper.php
Expand Up @@ -254,6 +254,7 @@ private function autocomplete(OutputInterface $output, Question $question, $inpu

// as opposed to fgets(), fread() returns an empty string when the stream content is empty, not false.
if (false === $c || ('' === $ret && '' === $c && null === $question->getDefault())) {
shell_exec(sprintf('stty %s', $sttyMode));
throw new RuntimeException('Aborted.');
} elseif ("\177" === $c) { // Backspace Character
if (0 === $numMatches && 0 !== $i) {
Expand Down
1 change: 0 additions & 1 deletion src/Symfony/Component/Console/Tester/CommandTester.php
Expand Up @@ -68,7 +68,6 @@ public function execute(array $input, array $options = [])
if (isset($options['interactive'])) {
$this->input->setInteractive($options['interactive']);
}

$this->output = new StreamOutput(fopen('php://memory', 'w', false));
$this->output->setDecorated(isset($options['decorated']) ? $options['decorated'] : false);
if (isset($options['verbosity'])) {
Expand Down

0 comments on commit 485d2bb

Please sign in to comment.