Skip to content

Commit

Permalink
Fix broken stdin
Browse files Browse the repository at this point in the history
  • Loading branch information
veewee committed Jul 13, 2020
1 parent 8457d88 commit 0cd3737
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/IO/ConsoleIO.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ public function readCommandInput($handle): string
);
}

if (0 !== ftell($handle)) {
// Validate if the stdin was already read (possibly by another part of the code)
if ($this->stdin !== '' || ftell($handle) > 0) {
return $this->stdin;
}

Expand Down

0 comments on commit 0cd3737

Please sign in to comment.