浏览代码

Fallback to include `vendor/.composer/autoload.php` for `bin/composer`

When Composer is a dependency for a project the `vendor/bin/composer`
script will not run as it is looking for `__DIR__.'/../vendor'` which
likely will not exist. What I believe is intended is for the script
to include the packages `vendor/.composer/autoload.php`.
Beau Simensen 13 年之前
父节点
当前提交
d7714983c3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      bin/composer

+ 1 - 1
bin/composer

@@ -1,7 +1,7 @@
 #!/usr/bin/env php
 <?php
 
-if (!@include __DIR__.'/../vendor/.composer/autoload.php') {
+if ((!@include __DIR__.'/../vendor/.composer/autoload.php') and (!@include 'vendor/.composer/autoload.php')) {
     die('You must set up the project dependencies, run the following commands:
 wget http://getcomposer.org/composer.phar
 php composer.phar install