Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drush 9 alias files not discoverable #3593

Closed
mrweiner opened this issue Jun 28, 2018 · 3 comments
Closed

Drush 9 alias files not discoverable #3593

mrweiner opened this issue Jun 28, 2018 · 3 comments

Comments

@mrweiner
Copy link

#3107 (comment) states that ~/.drush/sites is a discoverable directory
Running drush site:alias-convert and specifying that directory results in the files being generated, but even after running drush cc drush, drush sa returns { } and no aliases are listed with drush status.

https://github.com/drush-ops/drush/blob/master/examples/example.site.yml states that discoverable directories are $ROOT/drush/sites and $ROOT/../drush/sites

  • In my composer managed project -- where $ROOT contains /sites/, /core, etc -- $ROOT/drush seems to be a file. As such, $ROOT/drush/sites is not an option.
  • When I copy the files generated above by drush site:alias-convert to $ROOT/../drush/sites and run drush cc drush, drush sa returns { } and no aliases are listed with drush status.

Given the above, how exactly can I make my alias files discoverable by Drush? I seem to be out of options.

@greg-1-anderson
Copy link
Member

In the short term, remove the file $ROOT/drush and create a directory in that path.

If any of the paths mentioned above are not working, I am +1 on fixing those bugs.

@greg-1-anderson
Copy link
Member

c.f. https://github.com/consolidation/site-alias

Reproduce any bugs with the current dev-master of Drush, which uses the above project. Port was one-to-one, so all existing bugs were probably ported faithfully.

@greg-1-anderson
Copy link
Member

Oh, I forgot! Drush 9 disables all global locations for aliases by default. This was changed after the issue you quoted above. If you'd like to use ~/.drush/sites as a location for site aliases, add the following to your ~/.drush/drush.yml file:

drush:
  paths:
    alias-path:
      - '${env.home}/.drush/sites'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants