Skip to content

Commit

Permalink
Use COMPOSER_VENDOR_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
Vendin committed Aug 6, 2019
1 parent eb00755 commit bc94cf1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Console/TinkerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ public function handle()
$shell->addCommands($this->getCommands());
$shell->setIncludes($this->argument('include'));

$path = $this->getLaravel()->basePath().DIRECTORY_SEPARATOR.'vendor/composer/autoload_classmap.php';
if (isset($_ENV['COMPOSER_VENDOR_DIR'])) {
$path = $_ENV['COMPOSER_VENDOR_DIR'];
} else {
$path = $this->getLaravel()->basePath().DIRECTORY_SEPARATOR.'vendor';
}
$path .= '/composer/autoload_classmap.php';

$loader = ClassAliasAutoloader::register($shell, $path);

Expand Down

0 comments on commit bc94cf1

Please sign in to comment.