function drush_hosting_package_pre_hosting_task

7.x-3.x hosting_package.drush.inc drush_hosting_package_pre_hosting_task()

File

package/hosting_package.drush.inc, line 7
Drush include for the package management module.

Code

function drush_hosting_package_pre_hosting_task() {
  $task = &drush_get_context('HOSTING_TASK');
  if ($task->ref->type == 'site') {
    // populate the profile option, if it hasn't been specified yet.
    if (empty($task->options['profile'])) {
      $profile = node_load($task->ref->profile);
      if ($task->task_type != 'import' && $task->task_type != 'delete' && $task->task_type != 'verify') {
        $task->options['profile'] = $profile->short_name;
      }
    }
  }
}