From 770b32ca006721cde2fe94853033b823c74e6d1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my?= Date: Sat, 25 Mar 2017 13:18:01 +0100 Subject: [PATCH] nodejs persistence: use npm prefix to install bins into data dir / env_add_path with $data_dir --- nodejs.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nodejs.json b/nodejs.json index 4368445c66..38246619b4 100644 --- a/nodejs.json +++ b/nodejs.json @@ -12,11 +12,11 @@ "hash": "2888f2303bcaa35f05b3dce7cbfee58af77dcea6bed4b9ff549b181c65eb4565" } }, - "env_add_path": "nodejs", + "env_add_path": ["nodejs", "$data_dir"], "persist": "nodejs/node_modules", "post_install": " -# Remove npmrc that makes global modules get installed in AppData\\Roaming\\npm -if(test-path $dir\\nodejs\\node_modules\\npm\\npmrc) { rm $dir\\nodejs\\node_modules\\npm\\npmrc } +# Set npm prefix to install module inside $data_dir +Set-Content -Value \"prefix=$data_dir\" -Path $data_dir\\node_modules\\npm\\npmrc npm update -g", "checkver": { "url": "https://nodejs.org/en/download/current/",