Skip to content

Commit f082b1f

Browse files
committed
Always restore TTY by calling Stdin::pause() in Stdin::close()
1 parent db17f53 commit f082b1f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Stdin.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ public function pause()
4141
}
4242
}
4343

44+
public function close()
45+
{
46+
$this->pause();
47+
parent::close();
48+
}
49+
4450
public function __destruct()
4551
{
4652
$this->pause();

src/Stdio.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ public function end($data = null)
110110
public function close()
111111
{
112112
$this->readline->setInput('')->setPrompt('')->clear();
113-
$this->input->pause();
114113
$this->input->close();
115114
$this->output->close();
116115
}

0 commit comments

Comments
 (0)