Skip to content

Commit

Permalink
Configure npm proxy when proxy environmentals exist (#712)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmedelmann authored Oct 4, 2023
1 parent 90a9b1d commit 0d7ad7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/node/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "node",
"version": "1.3.0",
"version": "1.3.1",
"name": "Node.js (via nvm), yarn and pnpm",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/node",
"description": "Installs Node.js, nvm, yarn, pnpm, and needed dependencies.",
Expand Down
3 changes: 3 additions & 0 deletions src/node/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 0d7ad7c

Please sign in to comment.