Commit b2f412cc authored by Steven Jones's avatar Steven Jones Committed by helmo

Issue #2938032 by Steven Jones: Provision incorrectly scans profiles for packages

parent 23555e75
......@@ -169,8 +169,18 @@ function _provision_drupal_search_paths($scope, $key = '', $type = 'modules') {
$searchpaths[] = sprintf("%s/sites/all/%s", $drupal_root, $type);
break;
case 'profiles':
foreach (_provision_find_profiles() as $profile) {
$searchpaths[] = $profile->path;
$profiles = _provision_find_profiles();
if ($key) {
if (isset($profiles[$key])) {
// Find $type within this single profile.
$searchpaths[] = sprintf("%s/%s", $profiles[$key]->path, $type);
}
}
else {
// Find $type within all profiles.
foreach ($profiles as $profile) {
$searchpaths[] = sprintf("%s/%s", $profile->path, $type);
}
}
break;
default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment