mirror of
https://github.com/samanhappy/mcphub.git
synced 2025-12-24 02:39:19 -05:00
24 lines
643 B
Bash
24 lines
643 B
Bash
#!/bin/bash
|
|
|
|
NPM_REGISTRY=${NPM_REGISTRY:-https://registry.npmjs.org/}
|
|
echo "Setting npm registry to ${NPM_REGISTRY}"
|
|
npm config set registry "$NPM_REGISTRY"
|
|
|
|
# 处理 HTTP_PROXY 和 HTTPS_PROXY 环境变量
|
|
if [ -n "$HTTP_PROXY" ]; then
|
|
echo "Setting HTTP proxy to ${HTTP_PROXY}"
|
|
npm config set proxy "$HTTP_PROXY"
|
|
export HTTP_PROXY="$HTTP_PROXY"
|
|
fi
|
|
|
|
if [ -n "$HTTPS_PROXY" ]; then
|
|
echo "Setting HTTPS proxy to ${HTTPS_PROXY}"
|
|
npm config set https-proxy "$HTTPS_PROXY"
|
|
export HTTPS_PROXY="$HTTPS_PROXY"
|
|
fi
|
|
|
|
echo "Using REQUEST_TIMEOUT: $REQUEST_TIMEOUT"
|
|
echo "Using UV_PYTHON_INSTALL_MIRROR: $UV_PYTHON_INSTALL_MIRROR"
|
|
|
|
exec "$@"
|