Skip to content
This repository was archived by the owner on Oct 1, 2020. It is now read-only.

Commit febe1e9

Browse files
committed
[Upgrade] Redis support for Magento 2.3+ #208
1 parent a34bab4 commit febe1e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/guest/configure_cache_backend

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ incrementNestingLevel
99

1010
cache_backend="$(bash "${vagrant_dir}/scripts/get_config_value.sh" "environment_cache_backend")"
1111
magento_composer_content="$(cat "${MAGENTO_ROOT}/composer.json")"
12-
redis_configuration="
12+
redis_configuration=",
1313
'cache' => [
1414
'frontend' => [
1515
'default' => [
@@ -38,8 +38,8 @@ perl -i -p0e "s/,\s*'cache'.*\],/,/smg" "${MAGENTO_ROOT}/app/etc/env.php"
3838
incompatible_magento_version_pattern='"version": "2.0.[0-5]'
3939
if [[ ${cache_backend} == "redis" ]] && [[ ! ${magento_composer_content} =~ ${incompatible_magento_version_pattern} ]]; then
4040
status "Using Redis backend for caching"
41-
perl -i -p0e "s/\n*\);/${redis_configuration});/smg" "${MAGENTO_ROOT}/app/etc/env.php"
42-
perl -i -p0e "s/\n*\];/${redis_configuration}];/smg" "${MAGENTO_ROOT}/app/etc/env.php"
41+
perl -i -p0e "s/,?\n*\);/${redis_configuration});/smg" "${MAGENTO_ROOT}/app/etc/env.php"
42+
perl -i -p0e "s/,?\n*\];/${redis_configuration}];/smg" "${MAGENTO_ROOT}/app/etc/env.php"
4343
redis-cli flushall 2> >(logError) > >(log)
4444
else
4545
status "Using file system backend for caching"

0 commit comments

Comments
 (0)