1

In version 5.9, "drush site-alias --local" returns what I consider to be non-local sites, because they each have a remote-host and a remote-user component set in ~/aliases.drushrc.php.

I don't understand part of this excerpt from "drush help site-alias":

--local Only display sites that are available on the local system (remote-site not set, and Drupal root exists).

What does "remote-site" refer to -- some other component in ~/aliases.drushrc.php?

Thanks,

Glo

1

The filtering is done in the _drush_sitealias_user_specified_list() function with

if ((array_key_exists('remote-site', $one_site)) || (!array_key_exists('root', $one_site)) || (!is_dir($one_site['root']))) {
  unset($site_list[$site_name]);
}

So it looks like the remote-site option is used. But the documentation for the alias settings does mention a this option. So this looks like a bug.

Note: the same condition is still used in the latest version (see https://github.com/drush-ops/drush/blob/master/commands/core/sitealias.drush.inc#L164).

  • Since the documentation for the alias settings does not mention the remote-site option, I suppose I now have an obligation to request that it be modified. – Gloria Rom Apr 4 '14 at 15:01
  • @GloriaRom You could also modify the docs youself and submit a pull request on github.com/drush-ops/drush – mpdonadio Apr 4 '14 at 20:29
  • The doc does not need to be updated, the error is in _drush_sitealias_user_specified_list() as 'remote-site' is not used anywhere else in Drush's code. – Pierre Buyle Apr 7 '14 at 13:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.