Skip to content

Commit

Permalink
BSD fixes #318: Dont error out if drush cr breaks. Check that redis a…
Browse files Browse the repository at this point in the history
…nd memcache have already been defined.
  • Loading branch information
mattsqd committed Oct 29, 2024
1 parent fa08f47 commit 028718b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions orch/deploy_install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env bash

set -e

./orch/show_file.sh $0

# Normally, XDEBUG_MODE=debug,develop but develop breaks the Drupal installation.
Expand All @@ -12,6 +10,8 @@ fi

drush cr

set -e

# If using Postgres, enable the pg_trgm extension which is required before
# Drupal is installed.
if [ -n "$(drush status | grep pgsql 2>/dev/null)" ]; then
Expand Down
3 changes: 2 additions & 1 deletion web/sites/default/settings.memcache.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
if ((
!InstallerKernel::installationAttempted() &&
(extension_loaded('memcached') || extension_loaded('memcache')) &&
file_exists($app_root . '/modules/contrib/memcache')
file_exists($app_root . '/modules/contrib/memcache') &&
!function_exists('_settings_memcache')
)) {
function _settings_memcache(array &$settings, string $host): void {
$settings['memcache']['servers'][$host] = 'default';
Expand Down
3 changes: 2 additions & 1 deletion web/sites/default/settings.redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
if ((
!InstallerKernel::installationAttempted() &&
extension_loaded('redis') &&
class_exists('Drupal\redis\ClientFactory')
class_exists('Drupal\redis\ClientFactory') &&
!function_exists('_settings_redis')
)) {
function _settings_redis(array &$settings, string $host, string $port): void {
$settings['redis.connection']['host'] = $host;
Expand Down

0 comments on commit 028718b

Please sign in to comment.