Skip to content

Commit

Permalink
TaskInterface::Run() should always return a Result. (consolidation#986)
Browse files Browse the repository at this point in the history
  • Loading branch information
pfrenssen authored Sep 20, 2020
1 parent 0de9f7b commit c496c3b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Task/File/Replace.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ public function limit($limit)
public function run()
{
if (!file_exists($this->filename)) {
$this->printTaskError('File {filename} does not exist', ['filename' => $this->filename]);
return false;
return Result::error($this, 'File {filename} does not exist', ['filename' => $this->filename]);
}

$text = file_get_contents($this->filename);
Expand Down

0 comments on commit c496c3b

Please sign in to comment.