function drush_pm_updatecode_validate

8.0.x pm.drush.inc drush_pm_updatecode_validate()
6.x pm.drush.inc drush_pm_updatecode_validate()
7.x pm.drush.inc drush_pm_updatecode_validate()
4.x pm.drush.inc drush_pm_updatecode_validate()
5.x pm.drush.inc drush_pm_updatecode_validate()
master pm.drush.inc drush_pm_updatecode_validate()

Validate callback for updatecode command. Abort if 'backup' directory exists.

File

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

Code

function drush_pm_updatecode_validate() {
  $path = drush_get_context('DRUSH_DRUPAL_ROOT') . '/backup';
  if (is_dir($path) && (realpath(drush_get_option('backup-dir', FALSE)) != $path)) {
    return drush_set_error('', dt('Backup directory !path found. It\'s a security risk to store backups inside the Drupal tree. Drush now uses by default ~/drush-backups. You need to move !path out of the Drupal tree to proceed. Note: if you know what you\'re doing you can explicitly set --backup-dir to !path and continue.', array('!path' => $path)));
  }
}