From 5c1e8a1dd8269fb0e4147c95010cf4d1ce6298af Mon Sep 17 00:00:00 2001 From: croensch Date: Thu, 2 Mar 2023 22:48:56 +0100 Subject: [PATCH] automatically set proxy for pear/pecl (#692) * automatically set proxy for pear/pecl * only set once * fix shell code style * fix possibly unset vars --- install-php-extensions | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/install-php-extensions b/install-php-extensions index e9e2379..33f980d 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -3712,6 +3712,13 @@ configureInstaller() { done fi if test $USE_PICKLE -eq 0; then + if test -z "$(pear config-get http_proxy)"; then + if test -n "${http_proxy:-}"; then + pear config-set http_proxy "$http_proxy" || true + elif test -n "${HTTP_PROXY:-}"; then + pear config-set http_proxy "$HTTP_PROXY" || true + fi + fi pecl channel-update pecl.php.net || true fi }