summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Pugh2016-06-19 15:26:17 -0400
committerJon Pugh2016-06-19 15:26:17 -0400
commit58f00eec855986347b09a10718b04b69593a7a23 (patch)
tree8a726a8256412637508fc7fa3fc275ca8a7d082b
parent237f8946a19872dc99555f8a5160bbe7f13b665f (diff)
Implementing Issue #2473679: Make pre-delete backup optional.2473679-pre-delete-backup-optional
-rw-r--r--platform/delete.provision.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/delete.provision.inc b/platform/delete.provision.inc
index 9937b62..798e1ad 100644
--- a/platform/delete.provision.inc
+++ b/platform/delete.provision.inc
@@ -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');
+ }
}
/**