Skip to content

Commit

Permalink
FIX Ensure composer.json file exists before reading it
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz authored Nov 8, 2021
1 parent a0f963b commit 26f8e9f
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 26f8e9f

Please sign in to comment.