Closed nikunjkotecha closed 2 years ago
See #21 and https://github.com/acquia/blt/issues/4175 . I don't think the solution is so trivial as just making Lando local. Functionally, it's actually closer to Cloud (in terms of where settings files and other directories are located). Arbitrarily switching it to local would probably break the zero-configuration setup.
Clarification: Lando is already considered local. It's also considered an AH environment.
@danepowell It seems we need to update the function isAhEnv (assuming AH here means Acquia Hosting)
as checked in https://github.com/acquia/drupal-environment-detector/blob/master/src/AcquiaDrupalEnvironmentDetector.php#L13 it returns true even for LANDO and that is causing problems in conditions based on this function.
What problems? It is an Acquia hosting environment, albeit one that you run locally. But the file structure and available resources should all be the same.
See https://github.com/acquia/acquia_cms/blob/develop/patches/d9-acms-settings.patch
In Acquia CMS the condition is to execute some code on AH environment and that condition returns true even in LANDO since the variable is set and the only condition inside isAhEnv is that if the variable is set or not.
Question (sorry for stepping back):
Again, I don't see what problem that conditional is causing, can you provide an example? It essentially just includes database settings, which is desirable (Acquia Lando environments provide DB settings just like Acquia Cloud). It shouldn't cause problems.
We don't have /var/www/site-php/ in Lando
With
acquia
recipe of Lando we get LANDO for AH_SITE_ENVIRONMENT environment variable.https://docs.lando.dev/config/acquia.html
Since this returns true lot of additional code is executed in local which is actually not required.
Steps to reproduce - Setup new project with Acquia CMS default steps using Lando and use
acquia
recipe for it.