Skip to content

Commit

Permalink
Merge pull request #49 from silverstripe/emteknetnz-patch-1
Browse files Browse the repository at this point in the history
FIX Ensure composer.json file exists before reading it
  • Loading branch information
kinglozzer authored Nov 9, 2021
2 parents a0f963b + 26f8e9f commit 814cfa9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Library.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ protected function getJson()
return $this->json;
}
$composer = Util::joinPaths($this->getPath(), 'composer.json');
if (!file_exists($composer)) {
return [];
}
$file = new JsonFile($composer);
$this->json = $file->read();
return $this->json;
Expand Down

0 comments on commit 814cfa9

Please sign in to comment.