The drush command 'cc all' could not be executed.                    [error]
Could not find a Drupal settings.php file at                         [error]

D'oh. :(


msonnabaum’s picture

Version: All-versions-4.x-dev »

D8 is unsupported for 4.x. Needs to be fixed in drush5.

This is broke enough that I'd consider a backport however.

clemens.tolboom’s picture

Some greps

grep -r include * | grep _ROOT
commands/core/drupal/      include_once DRUPAL_ROOT . '/' . $current_set['file'];
commands/core/drupal/        include_once DRUPAL_ROOT . '/' . $batch_set['file'];
tests/userTest.php:    $eval = "require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/');";


grep -r drush_drupal_major_version *
grep -r drush_drupal_major_version *
commands/core/        if (drush_drupal_major_version() >= 7) {
commands/core/  switch(drush_drupal_major_version()) {

makes you wonder what impact changing a directory has.

moshe weitzman’s picture

Status: Active » Fixed

Fixed in master. See 3d8688c.

The change for contributed commands is to use a new constant, DRUSH_DRUPAL_CORE which points to /core in D8 and Drupal root in D6/D7:

-  require_once drush_get_context('DRUSH_DRUPAL_ROOT') . '/includes/';
+  require_once DRUSH_DRUPAL_CORE . '/includes/';

I don't want 4.x to even pretend to support 4 major versions of Drupal at same time. So, no backport.

clemens.tolboom’s picture

I think it would be nice to advertise these supported platforms on the project page :-)

moshe weitzman’s picture

we already do: "Note that Drush5+ works with three versions of Drupal (6,7,8). Use Drush 4 for Drupal 5."

webchick’s picture

YAY!! Thank you!! :D

clemens.tolboom’s picture

@moshe weitzman #5 sorry ... I missed it on the project page ... I checked and it's listed

drush on D8 works ... cool.

xjm’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.