Skip to content

Commit 720fe0d

Browse files
authored
Fix #3741 Handle global Drush9 edge case (#3746)
* Handle global Drush9 edge case - #3741. * Add docs link.
1 parent b9575c4 commit 720fe0d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Config/Environment.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ public function loadSiteAutoloader($root)
5959
}
6060

6161
$this->siteLoader = require $autloadFilePath;
62+
if ($this->siteLoader === false) {
63+
// Nothing more to do. See https://github.com/drush-ops/drush/issues/3741.
64+
return $this->loader;
65+
}
6266
if ($this->siteLoader === true) {
6367
// The autoloader was already required. Assume that Drush and Drupal share an autoloader per
6468
// "Point autoload.php to the proper vendor directory" - https://www.drupal.org/node/2404989

sut/autoload.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@
1111
* @see core/modules/statistics/statistics.php
1212
*/
1313

14-
return require __DIR__ . '/../vendor/autoload.php';
14+
// Use include instead of return because See https://github.com/drush-ops/drush/issues/3741
15+
return include __DIR__ . '/../vendor/autoload.php';

0 commit comments

Comments
 (0)