function drush_pm_updatecode_validate

8.0.x drush_pm_updatecode_validate()
6.x drush_pm_updatecode_validate()
7.x drush_pm_updatecode_validate()
4.x drush_pm_updatecode_validate()
5.x drush_pm_updatecode_validate()
master drush_pm_updatecode_validate()

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


commands/pm/, line 1365
The drush Project Manager


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)));