Skip to content

Commit

Permalink
Fix autoloading when installed globally with composer
Browse files Browse the repository at this point in the history
  • Loading branch information
iamluc committed Apr 24, 2016
1 parent 246b743 commit 815a16c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/docker-hostmanager
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ if (PHP_SAPI !== 'cli') {
die('Warning: docker-hostmanager must be invoked via the CLI version of PHP, not the '.PHP_SAPI.' SAPI'.PHP_EOL);
}

require __DIR__.'/../vendor/autoload.php';
foreach ([__DIR__.'/../vendor/autoload.php', __DIR__.'/../../../autoload.php'] as $file) {
if (file_exists($file)) {
require $file;
break;
}
}

use DockerHostManager\Command\SynchronizeHostsCommand;
use Symfony\Component\Console\Application;
Expand Down

0 comments on commit 815a16c

Please sign in to comment.