aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlec <arr70017@uga.edu>2019-01-12 15:21:43 -0500
committerMarc Alexander <admin@m-a-styles.de>2019-01-13 12:06:59 +0100
commitec3bab231d63cef251ad0d1402c45d94fcfc07c1 (patch)
tree76b09f888d89fc46e58b2ec94a11e0729506ccbf
parent673433dadbc43e3c2edd6bdbd263454371ab4c44 (diff)
downloadforums-ec3bab231d63cef251ad0d1402c45d94fcfc07c1.tar
forums-ec3bab231d63cef251ad0d1402c45d94fcfc07c1.tar.gz
forums-ec3bab231d63cef251ad0d1402c45d94fcfc07c1.tar.bz2
forums-ec3bab231d63cef251ad0d1402c45d94fcfc07c1.tar.xz
forums-ec3bab231d63cef251ad0d1402c45d94fcfc07c1.zip
[ticket/15935] Don't install APCu if it's already installed
Travis fails when the APCu install fails due to it already being installed A check is added here to make sure that it does nothing in that case PHPBB3-15935
-rwxr-xr-xtravis/setup-php-extensions.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/travis/setup-php-extensions.sh b/travis/setup-php-extensions.sh
index 918f67cd47..de27965e39 100755
--- a/travis/setup-php-extensions.sh
+++ b/travis/setup-php-extensions.sh
@@ -56,10 +56,13 @@ fi
# APCu
if [ `php -r "echo (int) (version_compare(PHP_VERSION, '7.0.0-dev', '>=') && version_compare(PHP_VERSION, '7.3.0-dev', '<'));"` == "1" ]
then
- echo 'Enabling APCu PHP extension'
- printf "\n" | pecl install apcu
- echo 'apc.enabled=1' >> "$php_ini_file"
- echo 'apc.enable_cli=1' >> "$php_ini_file"
+ if ! [ "$(pecl info pecl/apcu)" ]
+ then
+ echo 'Enabling APCu PHP extension'
+ printf "\n" | pecl install apcu
+ echo 'apc.enabled=1' >> "$php_ini_file"
+ echo 'apc.enable_cli=1' >> "$php_ini_file"
+ fi
fi