function drush_pm_enable_find_project_from_extension

8.0.x pm.drush.inc drush_pm_enable_find_project_from_extension($extension)
7.x pm.drush.inc drush_pm_enable_find_project_from_extension($extension)
master pm.drush.inc drush_pm_enable_find_project_from_extension($extension)

Helper function for pm-enable.

1 call to drush_pm_enable_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 959
The drush Project Manager

Code

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

  if (!isset($result)) {
    $release_info = drush_get_engine('release_info');

    // 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_request($extension);
    if ($release_info->checkProject($request)) {
      $result = $extension;
    }
  }

  return $result;
}