automatically set proxy for pear/pecl (#692)

* automatically set proxy for pear/pecl

* only set once

* fix shell code style

* fix possibly unset vars
pull/712/head 2.1.3
croensch 2023-03-02 22:48:56 +01:00 committed by GitHub
parent 93c7e386e8
commit 5c1e8a1dd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -3712,6 +3712,13 @@ configureInstaller() {
done done
fi fi
if test $USE_PICKLE -eq 0; then 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 pecl channel-update pecl.php.net || true
fi fi
} }