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

checks for existing settings files before adding default files #4157

Merged
merged 3 commits into from
Jun 22, 2020

Conversation

shelane
Copy link
Contributor

@shelane shelane commented May 28, 2020

Fixes #4156

Changes proposed

On a blt:init:settings run, check for the existence of sites/settings/global.settings.php file and only copy the default file if it does not exist. Also, check if the site/settings.php file exists and only issue the warning if it does not.

Steps to replicate the issue

  1. Rename sites/settings/default.global.settings.php to sites/settings/global.settings.php
  2. Remove the default.settings.php file from the sites/default directory where a multisite already has a settings.php file.
  3. See sites/settings/default.global.settings.php added and warnings issued.

Expected behavior, after applying PR and re-running test steps

No warnings should be generated where a settings.php exists for a site. It should still be given if it does not exist. The sites/settings/default.global.settings.php should not reappear.

Additional details

This is against the 12.x branch. Please also port to 11.x.

@danepowell danepowell closed this Jun 22, 2020
@danepowell danepowell reopened this Jun 22, 2020
@danepowell danepowell merged commit 571b7f0 into acquia:12.x Jun 22, 2020
danepowell added a commit that referenced this pull request Jun 22, 2020
Co-authored-by: Dane Powell <git@danepowell.com>
@danepowell danepowell added the Enhancement A feature or feature request label Sep 4, 2020
@shelane shelane deleted the feature/default-settings branch November 19, 2021 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement A feature or feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't copy default settings files that are not needed
2 participants