diff --git a/commands/pm/pm.drush.inc b/commands/pm/pm.drush.inc index 44e9008..ab0d8da 100644 --- a/commands/pm/pm.drush.inc +++ b/commands/pm/pm.drush.inc @@ -1267,7 +1267,11 @@ function pm_parse_arguments($args, $dashes_to_underscores = TRUE) { */ function pm_parse_project_version($requests) { $requestdata = array(); - $drupal_version_default = drush_get_context('DRUSH_DRUPAL_MAJOR_VERSION', drush_get_option('default-major', 7)) . '.x'; + $drupal_version_default = drush_drupal_major_version(); + if (!$drupal_version_default) { + $drupal_version_default = drush_get_option('default-major', 7); + } + $drupal_version_default .= '.x'; $drupal_bootstrap = drush_get_context('DRUSH_BOOTSTRAP_PHASE') > 0; foreach($requests as $request) { $drupal_version = $drupal_version_default; diff --git a/includes/command.inc b/includes/command.inc index 7ec5348..08a9131 100644 --- a/includes/command.inc +++ b/includes/command.inc @@ -1430,7 +1430,7 @@ function _drush_add_commandfiles($searchpath, $phase = NULL, $reset = FALSE) { if (preg_match('/\.d([0-9]+)$/', $module, $matches)) { $drupal_version = $matches[1]; } - if (!empty($drupal_version) && (drush_has_boostrapped(DRUSH_BOOTSTRAP_DRUPAL_ROOT)) && ($drupal_version != drush_get_context('DRUSH_DRUPAL_MAJOR_VERSION', ''))) { + if (!empty($drupal_version) && ($drupal_version != drush_drupal_major_version())) { $load_command = FALSE; } else {