function drush_upgrade_site_upgrade_validate

3.x upgrade.drush.inc drush_upgrade_site_upgrade_validate($target_key = NULL)
4.x upgrade.drush.inc drush_upgrade_site_upgrade_validate($target_key = NULL)

File

commands/core/upgrade.drush.inc, line 48

Code

function drush_upgrade_site_upgrade_validate($target_key = NULL) {
  if (empty($target_key)) {
    return drush_set_error(dt('Missing argument: target'));
  }

  if (!$target_alias = drush_sitealias_get_record($target_key)) {
    return drush_set_error('Site alias not found: @target-key. See example.drushrc.inc.', array('@target-key' => $target_key));
  }

  if (!file_exists(dirname($target_alias['root']))) {
    drush_set_error('Site alias root not found: @root. See example.drushrc.inc.', array('@root' => dirname($target_alias['root'])));
  }
}