diff --git a/sapi/quickstart/linux/run-swoole-cli-builder-container.sh b/sapi/quickstart/linux/run-swoole-cli-builder-container.sh index 0086bd38e..70f1f8c00 100644 --- a/sapi/quickstart/linux/run-swoole-cli-builder-container.sh +++ b/sapi/quickstart/linux/run-swoole-cli-builder-container.sh @@ -16,11 +16,15 @@ OPTIONS='' while [ $# -gt 0 ]; do case "$1" in --mirror) + MIRROR="$2" case "$MIRROR" in china) - MIRROR="$2" OPTIONS=" --mirror china " ;; + *) + echo "$0 parameter error" + exit 0 + ;; esac ;; @@ -32,6 +36,8 @@ bash setup-php-runtime.sh ${OPTIONS} export PATH=${__PROJECT__}/bin/runtime:$PATH alias php="php -d curl.cainfo=${__PROJECT__}/bin/runtime/cacert.pem -d openssl.cafile=${__PROJECT__}/bin/runtime/cacert.pem " +export COMPOSER_ALLOW_SUPERUSER=1 + if [ "$MIRROR" = 'china' ]; then composer config -g repos.packagist composer https://mirrors.tencent.com/composer/ fi