function drush_pm_find_project_from_extension

6.x pm.drush.inc drush_pm_find_project_from_extension($extension)
4.x pm.drush.inc drush_pm_find_project_from_extension($extension)
5.x pm.drush.inc drush_pm_find_project_from_extension($extension)

Helper function for pm-enable.

1 call to drush_pm_find_project_from_extension()
drush_pm_enable_validate in commands/pm/pm.drush.inc
Validate callback. Determine the modules and themes that the user would like enabled.

File

commands/pm/pm.drush.inc, line 816
The drush Project Manager

Code

function drush_pm_find_project_from_extension($extension) {
  $result = drush_pm_lookup_extension_in_cache($extension);

  if (!isset($result)) {
    drush_include_engine('release_info', 'updatexml');
    // If we can find info on a project that has the same name
    // as the requested extension, then we'll call that a match.
    $request = pm_parse_project_version(array($extension));
    if (release_info_check_project($request[$extension])) {
      $result = $extension;
    }
  }

  return $result;
}