Skip to content

--ssh-options argument doesn't override ssh.options when using site:ssh #3883

@minorOffense

Description

@minorOffense

Describe the bug
When using a site alias file which has an entry for ssh options using the site:ssh command the alias file options aren't overridden by the command line argument value. But every other drush command favours the CLI argument over the alias file settings.

To Reproduce
Create a site alias file with some ssh options defined.

E.g.

ssh:
  options: -l username

Then call a drush command that uses ssh

e.g.

drush --ssh-options="-A" rsync @myalias @self

The alias ssh settings are overridden when rsync opens the SSH connection (which is good!)

However if you call site:ssh as the command

drush --ssh-options="-A" @myalias ssh echo "Hello"

Drush uses the settings from the alias file and ignores the --ssh-options parameter.

Expected behavior
Drush should always prefer the CLI arguments over the alias file defaults.

Actual behavior
It uses the ssh options from the alias file.

Workaround
Not really...

System Configuration

Q A
Drush version? 9.5
Drupal version? 8.x
PHP version 7.1
OS? Only tested on Linux but presume it would be for all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions