Skip to content
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

BLT 12 overwrites drush site alias default.site.yml #4233

Closed
benjifisher opened this issue Aug 29, 2020 · 3 comments · Fixed by #4297
Closed

BLT 12 overwrites drush site alias default.site.yml #4233

benjifisher opened this issue Aug 29, 2020 · 3 comments · Fixed by #4297
Labels
Bug Something isn't working

Comments

@benjifisher
Copy link
Contributor

Describe the bug

When I add a multisite with blt recipes:multisite:init, BLT creates a Drush site alias for the new multisite, as expected, but also munges the default site alias.

To Reproduce
Steps to reproduce the behavior, ideally starting from a fresh install of BLT:

  1. Make sure that drush/sites/default.site.yml has a valid URI (such as uri: https://default.lndo.site).
  2. Run blt recipes:multisite:init --site-dir=newsite --site-uri=https://newsite.lndo.site --remote-alias=newsite.remote and accept the defaults.
  3. Note that (1) has changed. The file now has uri: default.

Expected behavior

I expect that the site alias file newsite.site.yml is created, along with docroot/sites/newsite/, but that default.site.yml is unchanged.

BLT doctor output

+---------------------------+-------------------------------------+
| Property | Value |
+---------------------------+-------------------------------------+
| %paths.%root | /app/docroot |
| %paths.%site | sites/default |
| %paths.%modules | sites/all/modules |
| %paths.%themes | sites/all/themes |
| %paths.%config-sync | /app/config/default |
| %paths.%files | sites/default/files |
| %paths.%temp | /tmp |
| %paths.%private | /app/files-private/default |
| admin-theme | seven |
| alias-searchpaths.0 | /app/drush/sites |
| blt-version | 12.2.0 |
| bootstrap | Successful |
| composer-version | Composer 1.10.9 2020-07-16 12:57:00 |
| config-sync | /app/config/default |
| db-driver | mysql |
| db-hostname | database |
| db-name | drupal9 |
| db-password | drupal9 |
| db-port | 3306 |
| db-status | Connected |
| db-username | drupal9 |
| drupal-settings-file | sites/default/settings.php |
| drupal-version | 9.0.2 |
| drush-alias-files.0 | /app/drush/sites/default.site.yml |
| drush-alias-files.1 | /app/drush/sites/multi1.site.yml |
| drush-cache-directory | /var/www/.drush/cache |
| drush-conf.0 | /app/vendor/drush/drush/drush.yml |
| drush-conf.1 | /app/drush/drush.yml |
| drush-script | /app/vendor/drush/drush/drush |
| drush-temp | /tmp |
| drush-version | 10.3.1 |
| files | sites/default/files |
| install-profile | tufts |
| modules | sites/all/modules |
| php-bin | /usr/local/bin/php |
| php-conf.1 | false |
| php-os | Linux |
| private | /app/files-private/default |
| root | /app/docroot |
| site | sites/default |
| stacks.drupal-vm.inited | false |
| stacks.dev-desktop.inited | false |
| temp | /tmp |
| theme | tuftstheme |
| themes | sites/all/themes |
| uri | http://default |
+---------------------------+-------------------------------------+
+--------------------------------------+--------------------+
| Check | Problem |
+--------------------------------------+--------------------+
| NodeCheck:checkNodeVersionFileExists | .nvmrc file exists |
+--------------------------------------+--------------------+

System information

  • Operating system type: Linux
  • Operating system version: Ubunto 20.04
  • BLT version: 12.2.0

Additional context
Add any other context about the problem here.

@benjifisher benjifisher added the Bug Something isn't working label Aug 29, 2020
@danepowell
Copy link
Contributor

I'm not sure why the multisite command should touch the default site at all, seems like either it should leave the file alone if it exists already, or we should remove this logic for the default site altogether.

@benjifisher
Copy link
Contributor Author

I vote for "remove this logic for the default site altogether".

I am not sure when the default site gets set up. I think it happened the first time I ran blt setup. If not, or if I need to update the default site alias, I can always use blt recipes:multisite:init --site-dir=default.

@danepowell
Copy link
Contributor

@benjifisher do you want to help test a fix? #4297

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants