-
Notifications
You must be signed in to change notification settings - Fork 396
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
Do not assume Drupal VM is in use because config file is there #4217
Comments
can you check in the blt folder and look in local.blt.yml. Is there a vm-enable key in there? You should able to set that to false and BLT should immediately stop acting as if the VM is there. |
I did not have
The file As you can see, I left the comment in I notice that If you have a look at the function I mentioned, public function isDrupalVmConfigPresent() {
return file_exists($this->getConfigValue('repo.root') . '/Vagrantfile')
&& file_exists($this->getConfigValue('vm.config'));
} |
Did you overwrite
That's exactly the same as the "hack" you put into your blt.yml, thus the hack shouldn't be necessary in the first place. I think the only thing that should change here is a guard on MultisiteCommand::createSiteDrushAlias() to ensure the alias file is present. |
Is your feature request related to a problem? Please describe.
I am trying to set up a project using BLT where individual developers can choose between using Lando and Drupal VM. As soon as I add the file
box/config.yml
to the project, I get errors fromrecipes:multisite:init
.Describe the solution you'd like
Either add an option to
blt/blt.yml
describing the local environment (e.g.,lando
ordrupalvm
) or else add a boolean option describing whether to assume that Drupal VM is in use.Describe alternatives you've considered
As a work-around, I have added these lines to
blt/blt.yml
:Additional context
The comment lines above describe what I think causes the problem.
Here is what happens when I try to add a multisite to the project without that fix/hack:
In addition to the PHP warnings, the site-alias file is empty. The PHP warnings do not come from the step that generates the prompt
Would you like to generate new virtual host entry and database for this site inside Drupal VM?
. They come from a later step,createSiteDrushAlias()
, which checksInspector:isDrupalVmConfigPresent()
.The text was updated successfully, but these errors were encountered: