lando
lando copied to clipboard
`lando composer require abc/def` installs to wrong folder, if webroot is set to a folder and not .
How to reproduce:
- in .lando.yml, set webroot to a folder, e.g. webroot: blog/public (let us say, we have a path /home/user/Sites/Laravel-Blog/blog/ in which is our Laravel installation)
- go to your folder, where you run "lando start", e.g. /home/user/Sites/Laravel-Blog
- start lando, run
lando composer require abc/def
- the composer packages are not installed in the webroot folder ("/blog") but in the folder "Laravel-Blog".
If I am not mistaken, lando composer should respect the webroot path. The workaround is to do
lando ssh
,cd
in the roght path and runcomposer
there.
Running any lando command will do so in the current folder except lando start / stop
, which will traverse down to find a .lando.yml.
CD into the correct path and then run lando composer require abc/def
just as you would if you run it with PHP directly
Thank you! I didn't realize there is no need to ssh
into but I can just cd
there!