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

setting .lando.yml to use drush 9.5.2 that was set in composer #1317

Closed
shaal opened this Issue Nov 28, 2018 · 6 comments

Comments

Projects
None yet
5 participants
@shaal
Copy link
Contributor

shaal commented Nov 28, 2018

Documentation Issue

Tell us about your setup
Lando v3.0.0-rc.1, Ubuntu 18.10, docker-ce 18.09.0

Tell us about your .lando.yml

name: spiewak
recipe: pantheon
config:
  framework: drupal8
  xdebug: true
  env: dev
  site: spiewak
  id: c1f2d565-ac04-47ad-b2ee-d19bf281e8dc
  drush: composer

according to the documentation - https://docs.devwithlando.io/tutorials/drupal8.html#recipe
the above .lando.yml with drush:composer should be the correct way to use the drush I set in composer.

I setup drush in composer.json - "drush/drush": "^9.5"
after lando rebuild -y, running lando drush cr, I get this error -
/usr/bin/env: php: No such file or directory

(I can run successfully lando ssh, and in there ../vendor/bin/drush cr)

changing .lando.yml to

name: spiewak
recipe: pantheon
config:
  framework: drupal8
  xdebug: true
  env: dev
  site: spiewak
  id: c1f2d565-ac04-47ad-b2ee-d19bf281e8dc
tooling:
  drush:
    cmd:
      - /app/vendor/bin/drush

now running lando rebuild -y, solves the problem.
lando drush cr works perfect, it's using drush 9.5.2

@pirog

This comment has been minimized.

Copy link
Member

pirog commented Nov 28, 2018

@shaal the documentation you are referencing is for the drupal8 recipe. your .lando.yml indicates you have a pantheon recipe. The config between these two recipes is not swappable.

@shaal

This comment has been minimized.

Copy link
Contributor Author

shaal commented Nov 28, 2018

@pirog I tried implementing the recommendation in
https://docs.devwithlando.io/tutorials/pantheon.html#drush

tooling:
  drush:
    service: appserver
    cmd:
      - "drush"
      - "--root=/app/web"

after lando rebuild -y, still the same error. lando drush cr -

/usr/bin/env: php: No such file or directory

@pirog pirog added this to the RC1 milestone Nov 28, 2018

@pirog pirog self-assigned this Nov 28, 2018

@ccharlton

This comment has been minimized.

Copy link
Contributor

ccharlton commented Nov 29, 2018

A fellow developer mentioned changing her config to include drush: global:8.1.16 helped.

@jwbabc

This comment has been minimized.

Copy link

jwbabc commented Dec 3, 2018

@shaal I just want to thank you for posting your fix. I encountered this same error and being new to lando had no idea which environment variables to begin to look at. Your fix worked perfectly.

@aangelinsf

This comment has been minimized.

Copy link

aangelinsf commented Dec 10, 2018

Following the guidance from #1315, I can report that upgrading to Drush 9 and using the following worked for me:

tooling:
  drush:
    cmd: /app/vendor/bin/drush
@pirog

This comment has been minimized.

Copy link
Member

pirog commented Jan 13, 2019

This is caused by the same underlying issue as #1315 so closing as a dupe

@pirog pirog closed this Jan 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment