Skip to content

Commit

Permalink
Fixed error when using stdin
Browse files Browse the repository at this point in the history
  • Loading branch information
exussum12 committed Jan 6, 2017
1 parent 84b5f37 commit 2945037
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/DiffFileLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ public function __construct($fileName)

public function getChangedLines()
{
if (!is_readable($this->fileLocation)) {
if ((
!is_readable($this->fileLocation) &&
$this->fileLocation !== "php://stdin"
)) {
throw new InvalidArgumentException("Can't read file");
}

Expand Down

0 comments on commit 2945037

Please sign in to comment.