Skip to content
Browse files

Adding support for various composer autoload file locations, making c…

…omposer optional
  • Loading branch information...
1 parent 9445502 commit 8231fb2c68392b737c8f508bc9b594de6064b83b @Ocramius Ocramius committed Jun 9, 2012
Showing with 6 additions and 5 deletions.
  1. +6 −5 bin/doctrine.php
View
11 bin/doctrine.php
@@ -17,11 +17,12 @@
* <http://www.doctrine-project.org>.
*/
-if (!@include __DIR__ . '/../../../autoload.php') {
- die(<<<'EOT'
-This command can only be run when Doctrine is installed through Composer.
-EOT
- );
+$previousDir = null;
+$currentDir = __DIR__;
+
+while ($previousDir !== $currentDir && !@include_once($currentDir . '/vendor/autoload.php')) {
+ $previousDir = $currentDir;
+ $currentDir = dirname($currentDir);
}
$configFile = getcwd() . DIRECTORY_SEPARATOR . 'cli-config.php';

0 comments on commit 8231fb2

Please sign in to comment.
Something went wrong with that request. Please try again.