drush
drush copied to clipboard
Fixes #4591: Drush could not locate autoload.php when symlinked into …
#4591 Exception: Could not locate autoload.php
Seems harmless enough. Any thoughts @greg-1-anderson?
drush updatedb
works a little bit differently, so I had to change the priority.
if (file_exists($autoloadFile = $cwd . '/vendor/autoload.php')
|| file_exists($autoloadFile = $cwd . '/../vendor/autoload.php')
|| file_exists($autoloadFile = __DIR__ . '/vendor/autoload.php')
|| file_exists($autoloadFile = __DIR__ . '/../autoload.php')
|| file_exists($autoloadFile = __DIR__ . '/../../autoload.php')
) {
$loader = include_once($autoloadFile);
} else {
throw new \Exception("Could not locate autoload.php. cwd is $cwd; __DIR__ is " . __DIR__);
}