function package_handler_validate

8.0.x wget.inc package_handler_validate()
8.0.x git_drupalorg.inc package_handler_validate()
6.x wget.inc package_handler_validate()
6.x git_drupalorg.inc package_handler_validate()
7.x wget.inc package_handler_validate()
7.x git_drupalorg.inc package_handler_validate()
4.x wget.inc package_handler_validate()
4.x git_drupalorg.inc package_handler_validate()
4.x cvs.inc package_handler_validate()
5.x wget.inc package_handler_validate()
5.x git_drupalorg.inc package_handler_validate()
master wget.inc package_handler_validate()
master git_drupalorg.inc package_handler_validate()

Validate this package handler can run.

2 calls to package_handler_validate()
drush_pm_download_validate in commands/pm/pm.drush.inc
Implementation of drush_COMMAND_validate().
drush_pm_updatecode_validate in commands/pm/pm.drush.inc
Validate callback for updatecode command. Abort if 'backup' directory exists.

File

commands/pm/package_handler/cvs.inc, line 10
Drush PM CVS extension

Code

function package_handler_validate() {
  // Check cvs command exists. Disable possible output.
  $debug = drush_get_context('DRUSH_DEBUG');
  drush_set_context('DRUSH_DEBUG', FALSE);
  $success = drush_shell_exec('cvs --version');
  drush_set_context('DRUSH_DEBUG', $debug);
  if (!$success) {
    return drush_set_error('DRUSH_SHELL_COMMAND_NOT_FOUND', dt('cvs executable not found.'));
  }
  // Check cvs_deploy is enabled. Only for bootstrapped sites.
  if (drush_get_context('DRUSH_BOOTSTRAP_PHASE') >= DRUSH_BOOTSTRAP_DRUPAL_FULL) {
    if (!module_exists('cvs_deploy')) {
      drush_log(dt('cvs package handler needs cvs_deploy module enabled to work properly.'), 'warning');
    }
  }
}