Unverified Commit 0d7ad7c5 authored by Jan-Marco Edelmann's avatar Jan-Marco Edelmann Committed by GitHub

Configure npm proxy when proxy environmentals exist (#712)

parent 90a9b1d6
{ {
"id": "node", "id": "node",
"version": "1.3.0", "version": "1.3.1",
"name": "Node.js (via nvm), yarn and pnpm", "name": "Node.js (via nvm), yarn and pnpm",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/node", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/node",
"description": "Installs Node.js, nvm, yarn, pnpm, and needed dependencies.", "description": "Installs Node.js, nvm, yarn, pnpm, and needed dependencies.",
......
...@@ -228,6 +228,9 @@ if type pnpm > /dev/null 2>&1; then ...@@ -228,6 +228,9 @@ if type pnpm > /dev/null 2>&1; then
echo "pnpm already installed." echo "pnpm already installed."
else else
if type npm > /dev/null 2>&1; then 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 npm install -g pnpm
else else
echo "Skip installing pnpm because npm is missing" echo "Skip installing pnpm because npm is missing"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment