Commit 154405e5 authored by anarcat's avatar anarcat

log http config file creation/deletions

parent 454502f0
......@@ -230,9 +230,11 @@ class Provision_Service extends Provision_ChainedState {
*
* This method will fetch the class to instantiate from the internal
* $this->configs control array.
*
* @return the return value of unlink(), which is usually the file object
*/
function delete_config($config, $data = array()) {
$this->config($config, $data)->unlink();
return $this->config($config, $data)->unlink();
}
/**
......
......@@ -2,14 +2,18 @@
function drush_http_provision_delete() {
if (d()->type === 'site') {
d()->service('http')->delete_config('site');
d()->service('http')->delete_config('site')
->succeed('Deleted platform configuration file', 'success')
->fail('Failed to delete platform configuration file', 'DRUSH_PERM_ERROR');
}
if (d()->type === 'platform') {
if (!drush_get_option('force', FALSE) && drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_ROOT) && provision_drupal_find_sites()) {
drush_set_error(dt('Existing sites were found on this platform. These sites will need to be deleted before this platform can be deleted.'));
}
else {
d()->service('http')->delete_config('platform');
d()->service('http')->delete_config('platform')
->succeed('Deleted platform configuration file', 'success')
->fail('Failed to delete platform configuration file', 'DRUSH_PERM_ERROR');
}
}
d()->service('http')->parse_configs();
......
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