Skip to content

Commit

Permalink
Issue 2017189 by greg.1.anderson: Do not include options from alias r…
Browse files Browse the repository at this point in the history
…ecords -unless- they are global options.
  • Loading branch information
greg-1-anderson committed Jul 19, 2013
1 parent 934ad88 commit bbf2463
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion includes/backend.inc
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,9 @@ function _drush_backend_classify_options($site_record, $command_options, &$backe
$backend_options[$key] = $value;
}
if (!isset($command_options[$key])) {
$command_options[$key] = $value;
if (array_key_exists($key, $global_option_list)) {
$command_options[$key] = $value;
}
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions includes/command.inc
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,12 @@ function drush_redispatch_get_options() {
unset($cli_context['php-options']);
// cli overrides and command specific
$options = $cli_context + drush_get_context('specific');
$global_option_list = drush_get_global_options(FALSE);
foreach (drush_get_context('alias') as $key => $value) {
if (array_key_exists($key, $global_option_list)) {
$options[$key] = $value;
}
}

$options = array_diff_key($options, array_flip(drush_sitealias_site_selection_keys()));
unset($options['command-specific']);
Expand Down

0 comments on commit bbf2463

Please sign in to comment.