mirror of
https://github.com/composer/composer
synced 2025-05-11 09:32:55 +00:00
Check that if the getUrlMatches method returns an empty value which means the path is incorrect
This commit is contained in:
parent
f753c15664
commit
18895064ad
1 changed files with 7 additions and 1 deletions
|
@ -125,7 +125,13 @@ class PathRepository extends ArrayRepository implements ConfigurableRepositoryIn
|
|||
{
|
||||
parent::initialize();
|
||||
|
||||
foreach ($this->getUrlMatches() as $url) {
|
||||
$urlMatches = $this->getUrlMatches();
|
||||
|
||||
if (empty($urlMatches)) {
|
||||
throw new \RuntimeException('The `url` supplied for the path repository does not exist');
|
||||
}
|
||||
|
||||
foreach ($urlMatches as $url) {
|
||||
$path = realpath($url) . DIRECTORY_SEPARATOR;
|
||||
$composerFilePath = $path.'composer.json';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue