Skip to content

Commit

Permalink
Merge pull request #2301 from davyrolink/201608_themes-engines-sensib…
Browse files Browse the repository at this point in the history
…le-default-destination

download theme engines into the sensible default destination
  • Loading branch information
jonhattan committed Aug 18, 2016
2 parents 25e59b2 + 72e3c59 commit d2fc422
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions commands/pm/download.pm.inc
Expand Up @@ -306,16 +306,17 @@ function pm_drush_pm_download_destination_alter(&$request, $release) {
* @return String the candidate destination if it exists.
*/
function _pm_download_destination_lookup($type, $drupal_root, $sitepath, $create = FALSE) {
if ($type == 'theme engine') {
$destination = 'themes/engines';
}
// Profiles in Drupal < 8
elseif (($type == 'profile') && (drush_drupal_major_version() < 8)) {
if (($type == 'profile') && (drush_drupal_major_version() < 8)) {
$destination = 'profiles';
}
// Type: module, theme or profile.
else {
$destination = $type . 's';
if ($type == 'theme engine') {
$destination = 'themes/engines';
} else {
$destination = $type . 's';
}
// Prefer /contrib if it exists.
if ($sitepath) {
$destination = $sitepath . '/' . $destination;
Expand Down

0 comments on commit d2fc422

Please sign in to comment.