Skip to content

Commit

Permalink
Remove unused global options remote-host and remote-user. (#5045)
Browse files Browse the repository at this point in the history
  • Loading branch information
weitzman committed Jan 25, 2022
1 parent 14d5598 commit 58243aa
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
2 changes: 0 additions & 2 deletions includes/drush.inc
Expand Up @@ -137,8 +137,6 @@ function drush_get_global_options($brief = FALSE) {
$options['confirm-rollback'] = ['description' => 'Wait for confirmation before doing a rollback when something goes wrong.'];
$options['php-options'] = ['hidden' => TRUE, 'description' => "Options to pass to `php` when running drush. Only effective when specified in a site alias definition.", 'never-propagate' => TRUE, 'example-value' => '-d error_reporting="E_ALL"'];
$options['halt-on-error'] = ['propagate-cli-value' => TRUE, 'description' => "Manage recoverable errors. Values: 1=Execution halted. 0=Execution continues."];
$options['remote-host'] = ['hidden' => TRUE, 'description' => 'Remote site to execute drush command on. Managed by site alias.', 'example-value' => 'http://example.com'];
$options['remote-user'] = ['hidden' => TRUE, 'description' => 'User account to use with a remote drush command. Managed by site alias.', 'example-value' => 'www-data'];
$options['remote-os'] = ['hidden' => TRUE, 'description' => 'The operating system used on the remote host. Managed by site alias.', 'example-value' => 'linux'];
$options['strict'] = ['propagate' => TRUE, 'description' => 'Return an error on unrecognized options. --strict=0: Allow unrecognized options.'];
$options['command-specific'] = ['hidden' => TRUE, 'merge-associative' => TRUE, 'description' => 'Command-specific options.'];
Expand Down
12 changes: 1 addition & 11 deletions src/Application.php
Expand Up @@ -69,16 +69,6 @@ public function configureGlobalOptions()
new InputOption('--no', null, InputOption::VALUE_NONE, 'Cancels at any confirmation prompt.')
);

$this->getDefinition()
->addOption(
new InputOption('--remote-host', null, InputOption::VALUE_REQUIRED, 'Run on a remote server.')
);

$this->getDefinition()
->addOption(
new InputOption('--remote-user', null, InputOption::VALUE_REQUIRED, 'The user to use in remote execution.')
);

$this->getDefinition()
->addOption(
new InputOption('--root', '-r', InputOption::VALUE_REQUIRED, 'The Drupal root for this site.')
Expand All @@ -98,7 +88,7 @@ public function configureGlobalOptions()
// TODO: Implement handling for 'pipe'
$this->getDefinition()
->addOption(
new InputOption('--pipe', null, InputOption::VALUE_NONE, 'Select the canonical script-friendly output format.')
new InputOption('--pipe', null, InputOption::VALUE_NONE, 'Select the canonical script-friendly output format. Deprecated - use --format.')
);

$this->getDefinition()
Expand Down
6 changes: 1 addition & 5 deletions src/Commands/sql/SqlCommands.php
Expand Up @@ -90,12 +90,8 @@ public function create($options = ['db-su' => self::REQ, 'db-su-pw' => self::REQ
{
$sql = SqlBase::create($options);
$db_spec = $sql->getDbSpec();
// Prompt for confirmation.

// @todo odd - maybe for sql-sync.
$txt_destination = (isset($db_spec['remote-host']) ? $db_spec['remote-host'] . '/' : '') . $db_spec['database'];
$this->output()->writeln(dt("Creating database !target. Any existing database will be dropped!", ['!target' => $txt_destination]));

$this->output()->writeln(dt("Creating database !target. Any existing database will be dropped!", ['!target' => $db_spec['database']]));
if (!$this->getConfig()->simulate() && !$this->io()->confirm(dt('Do you really want to continue?'))) {
throw new UserAbortException();
}
Expand Down

0 comments on commit 58243aa

Please sign in to comment.