1
0
Fork 0

Warn users of missing composer.json

pull/77/merge
Jordi Boggiano 2011-10-30 21:13:49 +01:00
parent 6b6d6b6d82
commit e00e6cddbe
1 changed files with 3 additions and 0 deletions

View File

@ -34,6 +34,9 @@ $im->addInstaller(new Installer\LibraryInstaller($vendorPath.'/bundles', $dm, $r
// load package // load package
$loader = new Package\Loader\ArrayLoader($rm); $loader = new Package\Loader\ArrayLoader($rm);
$file = new JsonFile('composer.json'); $file = new JsonFile('composer.json');
if (!$file->exists()) {
throw new \RuntimeException('The composer.json file could not be found in the current directory');
}
$packageConfig = $file->read(); $packageConfig = $file->read();
$package = $loader->load($packageConfig); $package = $loader->load($packageConfig);