aboutsummaryrefslogtreecommitdiff
path: root/src/node/install.sh
diff options
context:
space:
mode:
authorJan-Marco Edelmann <jmedelmann@gmx.de>2023-10-05 01:09:35 +0300
committerGitHub <noreply@github.com>2023-10-05 01:09:35 +0300
commit0d7ad7c5fcc2569b46035b151dabba3449d1a0a7 (patch)
tree2143b5a8f82ef87d7251bc964b54c891aad62f5f /src/node/install.sh
parent90a9b1d6044235ab84af99922cb45b7e3093f4cd (diff)
Configure npm proxy when proxy environmentals exist (#712)feature_node_1.3.1
Diffstat (limited to 'src/node/install.sh')
-rwxr-xr-xsrc/node/install.sh3
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"