Skip to content

Commit

Permalink
Respect disable_settings_management, fixes #6 (#7)
Browse files Browse the repository at this point in the history
* Fixes issue #6 respect disable_settings_management
  • Loading branch information
joelpittet authored Jul 28, 2022
1 parent 9422e9e commit 29151de
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions redis/scripts/setup-drupal-settings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ then
exit 0
fi

if ( ddev debug configyaml 2>/dev/null | grep 'disable_settings_management:\s*true' >/dev/null 2>&1 ) ; then
exit 0
fi

cp redis/scripts/settings.ddev.redis.php $DDEV_APPROOT/$DDEV_DOCROOT/sites/default/

SETTINGS_FILE_NAME="${DDEV_APPROOT}/${DDEV_DOCROOT}/sites/default/settings.php"
Expand Down
11 changes: 11 additions & 0 deletions tests/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,14 @@ teardown() {
# Drupal configuration should not be present
[ ! -f web/sites/default/settings.ddev.redis.php ]
}

@test "Drupal 9 installation without settings management" {
ddev config --project-name=${PROJNAME} --disable-settings-management --project-type=drupal9 --docroot=web --create-docroot
ddev start -y
cd ${TESTDIR}
ddev get ${DIR}
ddev restart
ddev redis-cli INFO | grep "^redis_version:6."
# Drupal configuration should not be present
[ ! -f web/sites/default/settings.ddev.redis.php ]
}

0 comments on commit 29151de

Please sign in to comment.