We saw the message "Cannot find profiles directory ./profiles", and traced that to being caused by /profiles/ not being in Drupal core 8.8 anymore?

We are very tired.

/**
 * Find available profiles on this platform.
 */
function _provision_find_profiles() {
  $profile_dirs = array('./core/profiles', './profiles');

  $profiles = array();
  foreach($profile_dirs as $profile_dir) {
    if (!is_dir($profile_dir)) {
      drush_log(dt("Cannot find profiles directory %dir", array('%dir' => $profile_dir)), 'error');
      return FALSE;
    }

Comments

Jon Pugh created an issue.

Jon Pugh’s picture

I traced this "if profile dir is not found, fail" logic, as I don't think it's needed.

Climbing the git blame tree, looks like Anarcat added this code almost 12 years ago:

https://git.drupalcode.org/project/provision/-/commit/d0a37e40acecee7d97...


  if (!$dir = opendir("./profiles")) {
    provision_log('error', t("Cannot find profiles directory"));
    return FALSE;
  }

From the DIFF, it looks like this was the commit that introduced this logic. I'm not seeing a reason why it's needed!

A Drupal 8.8 composer install does NOT create a /docroot/profiles directory unless you explicitly composer require a drupal profile.

colan’s picture

Let's get rid of that then, but then make sure to test stuff afterwards. Other things could break if he made that assumption, which we'll have to fix too.