1

I'm attempting to get the drush alias to work with Pantheon, but when I try to run drush @pantheon.mysite.dev status I get Could not find the alias @pantheon.mysite.dev.

I've already installed the aliases by running terminus aliases, but it doesn't seem to be seeing the generated file. I did go in manually to confirm that the alias file was placed inside of the .drush directory.

When I run drush sa, I get the following:

@none
@self
default

I did recently installed drush 9 on my Drupal 8 sites, but I still have a number of Drupal 7 sites running an older version of drush. I understand that the directory structure for drush 9 is different. Do I need to install the aliases for it somewhere else?

Just so you're aware. I installed drush 9 via composer, and I'm using the drush launcher which lives in my bin directory.

  • Did you clear the drush cache? Try drush cc drush. – enzipher Nov 29 '17 at 18:37
  • 1
    If you're using terminus, why not use terminus drush? – Patrick Kenny Nov 29 '17 at 18:56
  • @enzipher I did, but it didn't make a difference. – Kellen Nov 29 '17 at 19:07
  • @PatrickKenny Oh jeez, I'm sorry. I didn't read far enough down in the article. That works for me. The docs tells you to use drush @pantheon.mysite.dev command before mentioning the alternative. Thanks for the help! I'll mark your answer as correct if you post. – Kellen Nov 29 '17 at 19:10
2

If you already have terminus installed, you can use terminus drush instead of your local drush.

The advantage of terminus drush is that it already has everything you need to work with Pantheon.

The disadvantage is that you will have to do some work to set it up with your local dev environment; for that, I would just use your local drush.

So, the workflow looks like this:

  • Do I need to call a drush command on Pantheon? terminus drush
  • Do I need to call a drush command on my local dev server? drush
  • Does it work with drush 9/Drupal 8.4? A senior Pantheon engineer told me recently that they don’t support drush 9, I’ve never been able to get it to work... – Clive Nov 29 '17 at 19:20
  • 1
    @Clive According to this, yes. – Patrick Kenny Nov 29 '17 at 19:26

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.