From e8836c6d4633b69ced2f2d1a26fba2d0c46df946 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Mon, 24 Oct 2022 09:14:25 +0530 Subject: [PATCH] Fix logs on failure in add_pecl_extension --- src/scripts/extensions/add_extensions.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scripts/extensions/add_extensions.sh b/src/scripts/extensions/add_extensions.sh index c9c8c9b61..0b461dfa2 100644 --- a/src/scripts/extensions/add_extensions.sh +++ b/src/scripts/extensions/add_extensions.sh @@ -191,7 +191,9 @@ add_pecl_extension() { disable_extension_helper "$extension" >/dev/null 2>&1 [ -n "$pecl_version" ] && pecl_version="-$pecl_version" pecl_install "$extension$pecl_version" || add_extension "$extension" "$(get_extension_prefix "$extension")" >/dev/null 2>&1 - add_extension_log "$extension-$(php -r "echo phpversion('$extension');")" "Installed and enabled" + extension_version="$(php -r "echo phpversion('$extension');")" + [ -n "$extension_version" ] && extension_version="-$extension_version" + add_extension_log "$extension$extension_version" "Installed and enabled" fi }