Skip to content

Commit bc94cf1

Browse files
committed
Use COMPOSER_VENDOR_DIR
1 parent eb00755 commit bc94cf1

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/Console/TinkerCommand.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@ public function handle()
5454
$shell->addCommands($this->getCommands());
5555
$shell->setIncludes($this->argument('include'));
5656

57-
$path = $this->getLaravel()->basePath().DIRECTORY_SEPARATOR.'vendor/composer/autoload_classmap.php';
57+
if (isset($_ENV['COMPOSER_VENDOR_DIR'])) {
58+
$path = $_ENV['COMPOSER_VENDOR_DIR'];
59+
} else {
60+
$path = $this->getLaravel()->basePath().DIRECTORY_SEPARATOR.'vendor';
61+
}
62+
$path .= '/composer/autoload_classmap.php';
5863

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

0 commit comments

Comments
 (0)