1
0
Fork 0

Merge remote-tracking branch 'CHH/feature/smarter-packagejson-append'

pull/1045/head
Jordi Boggiano 2012-08-29 15:22:27 +02:00
commit 9f3f80a8d0
1 changed files with 9 additions and 1 deletions

View File

@ -191,7 +191,15 @@ class ComposerRepository extends ArrayRepository implements NotifiableRepository
}
try {
$json = new JsonFile($this->url.'/packages.json', new RemoteFilesystem($this->io));
$jsonUrlParts = parse_url($this->url);
if (isset($jsonUrlParts['path']) and strpos($jsonUrlParts['path'], '/packages.json') !== false) {
$jsonUrl = $this->url;
} else {
$jsonUrl = $this->url . '/packages.json';
}
$json = new JsonFile($jsonUrl, new RemoteFilesystem($this->io));
$data = $json->read();
if (!empty($data['notify'])) {