Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
provision
Commits
897577ca
Commit
897577ca
authored
May 11, 2009
by
anarcat
Committed by
anarcat
May 11, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a new --force flag for backups that allows disable and delete to skip error checking
Closes:
#458250
parent
f759d426
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
platform/backup.provision.inc
platform/backup.provision.inc
+1
-1
platform/delete.provision.inc
platform/delete.provision.inc
+3
-1
platform/disable.provision.inc
platform/disable.provision.inc
+2
-0
No files found.
platform/backup.provision.inc
View file @
897577ca
...
...
@@ -51,7 +51,7 @@ function drush_provision_drupal_provision_backup($url) {
drush_log
(
dt
(
"Adding sites directory to !backup_file"
,
array
(
'!backup_file'
=>
$backup_file
)),
'backup'
);
$result
=
provision_shell_exec
(
"cd %s; tar -rf %s * "
,
drush_get_option
(
'sites_path'
)
.
"/
$url
"
,
$backup_file
);
if
(
!
$result
)
{
if
(
!
$result
&&
!
drush_get_option
(
'force'
,
false
)
)
{
drush_set_error
(
'PROVISION_BACKUP_FAILED'
,
dt
(
"Could not back up sites directory for drupal"
));
}
}
...
...
platform/delete.provision.inc
View file @
897577ca
...
...
@@ -10,7 +10,9 @@ function drush_provision_drupal_provision_delete_validate($url = NULL, $backup_f
* Before starting to delete the site, make a backup
*/
function
drush_provision_drupal_pre_provision_delete
(
$url
,
$backup_file
=
NULL
)
{
drush_invoke
(
'provision backup'
,
$url
,
$backup_file
);
drush_set_option
(
'force'
,
true
,
'process'
);
drush_invoke
(
"provision backup"
,
$url
,
$backup_file
);
drush_unset_option
(
'force'
,
'process'
);
}
/**
...
...
platform/disable.provision.inc
View file @
897577ca
...
...
@@ -23,7 +23,9 @@ function drush_provision_drupal_provision_disable_validate() {
* Make a backup of the site before we mess with it
*/
function
drush_provision_drupal_pre_provision_disable
(
$url
,
$backup_file
=
null
)
{
drush_get_option
(
'force'
,
true
,
'process'
);
drush_invoke
(
"provision backup"
,
$url
,
$backup_file
);
drush_unset_option
(
'force'
,
'process'
);
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment