From 0147f4170623ded62137a00ca7a62a762ebcef9a Mon Sep 17 00:00:00 2001 From: Stanislav Zhuk Date: Thu, 31 Oct 2024 21:23:24 +0200 Subject: [PATCH] Remove Drupal related add-on files from `.ddev` when not applicable (#27) --- redis/scripts/setup-drupal-settings.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/redis/scripts/setup-drupal-settings.sh b/redis/scripts/setup-drupal-settings.sh index 3cad2ee..c3b375a 100755 --- a/redis/scripts/setup-drupal-settings.sh +++ b/redis/scripts/setup-drupal-settings.sh @@ -4,6 +4,12 @@ set -e if [[ $DDEV_PROJECT_TYPE != drupal* ]] || [[ $DDEV_PROJECT_TYPE =~ ^drupal(6|7)$ ]] ; then + for file in redis/scripts/settings.ddev.redis.php redis/scripts/setup-drupal-settings.sh; do + if grep -q "#ddev-generated" "${file}" 2>/dev/null; then + echo "Removing ${file} as not applicable" + rm -f "${file}" + fi + done exit 0 fi