Commit fd89cd37 authored by mig5's avatar mig5 Committed by mig5

Revert "#1016890 - a contributed fix for provision-save infinite loop when...

Revert "#1016890 - a contributed fix for provision-save infinite loop when pulling options from stdin. happens to also fix cluster feature."

This reverts commit c214fe6063fdb7e9910b9a053f311c83a550827d.
parent dd78e222
......@@ -77,7 +77,7 @@ function provision_context_factory($name) {
$type = 'server';
$record = provision_sitealias_get_record($name);
$options = ($name == '@self') ? array_merge(drush_get_context('stdin'), drush_get_context('options')) : array();
$options = array_merge(drush_get_context('stdin'), drush_get_context('options'), drush_get_context('cli'));
if (isset($record['context_type'])) {
$type = $record['context_type'];
......@@ -133,13 +133,7 @@ class provisionContext {
*/
function __get($name) {
if ($name == 'options') {
$record = provision_sitealias_get_record($this->name);
if ($this->name == '@self') {
return array_merge($record, array_filter(drush_get_context('stdin')), array_filter(drush_get_context('options')));
}
else {
return $record;
}
return array_merge(provision_sitealias_get_record($this->name), array_filter(drush_get_context('stdin')), array_filter(drush_get_context('options')), array_filter(drush_get_context('cli')));
}
if (array_key_exists($name, $this->properties)) {
if (isset($this->oid_map[$name]) && !empty($this->properties[$name])) {
......
......@@ -223,15 +223,10 @@ function drush_provision_save($alias = null) {
$config->unlink();
}
else {
// rename @self and save.
d()->name = $alias;
// trigger additional logic that should happen only on save.
d()->type_invoke('save');
d($alias)->type_invoke('save');
// create or update the record
d()->write_alias();
d($alias)->write_alias();
}
}
......
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