Commit 58f00eec authored by Jon Pugh's avatar Jon Pugh

Implementing Issue #2473679: Make pre-delete backup optional.

parent 237f8946
......@@ -4,11 +4,15 @@
* Before starting to delete the site, make a backup
*/
function drush_provision_drupal_pre_provision_delete($backup_file = NULL) {
if (d()->type === 'site') {
if (d()->type === 'site' && !drush_get_option('skip-backup', FALSE)) {
drush_set_option('force', true, 'process');
drush_log(dt('Backing up site.'), 'notice');
drush_invoke("provision-backup", $backup_file);
drush_unset_option('force', 'process');
}
elseif (d()->type === 'site' && drush_get_option('skip-backup', FALSE)) {
drush_log(dt('Skipping backup.'), 'notice');
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment