From e00e6cddbecdbb96b8023caf119ed3a880e34b78 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 30 Oct 2011 21:13:49 +0100 Subject: [PATCH] Warn users of missing composer.json --- bin/composer | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/composer b/bin/composer index dada7b2eb..a12fe3ea3 100755 --- a/bin/composer +++ b/bin/composer @@ -34,6 +34,9 @@ $im->addInstaller(new Installer\LibraryInstaller($vendorPath.'/bundles', $dm, $r // load package $loader = new Package\Loader\ArrayLoader($rm); $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(); $package = $loader->load($packageConfig);