diff options
author | Jan-Marco Edelmann <jmedelmann@gmx.de> | 2023-10-05 01:09:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-05 01:09:35 +0300 |
commit | 0d7ad7c5fcc2569b46035b151dabba3449d1a0a7 (patch) | |
tree | 2143b5a8f82ef87d7251bc964b54c891aad62f5f /src/node/install.sh | |
parent | 90a9b1d6044235ab84af99922cb45b7e3093f4cd (diff) |
Configure npm proxy when proxy environmentals exist (#712)feature_node_1.3.1
Diffstat (limited to 'src/node/install.sh')
-rwxr-xr-x | src/node/install.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/node/install.sh b/src/node/install.sh index 8091094..9a696ca 100755 --- a/src/node/install.sh +++ b/src/node/install.sh @@ -228,6 +228,9 @@ if type pnpm > /dev/null 2>&1; then echo "pnpm already installed." else if type npm > /dev/null 2>&1; then + [ ! -z "$http_proxy" ] && npm set proxy="$http_proxy" + [ ! -z "$https_proxy" ] && npm set https-proxy="$https_proxy" + [ ! -z "$no_proxy" ] && npm set noproxy="$no_proxy" npm install -g pnpm else echo "Skip installing pnpm because npm is missing" |