From d93f98fd1d37519fc175911dcc053d9de074193a Mon Sep 17 00:00:00 2001 From: Luke Sampson Date: Thu, 30 Mar 2017 09:13:27 +1100 Subject: [PATCH] NodeJS without $persist_dir in env_add_path / mark persist dirs as read-only (#1) * A NodeJS install with persistence that doesn't use $persist_dir variable in manifest * persist nodejs fix npm updating itself * A NodeJS install with persistence that doesn't use $persist_dir variable in manifest * Fix 'Access is denied' error removing 'current' directory junction. * change nodejs install behaviour to match upstream installer `npm update -g` has been remove because it has no effect on the installed npm version and does not match the official installer behaviour. --- nodejs.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nodejs.json b/nodejs.json index b0ed23cb47..c454ef4352 100644 --- a/nodejs.json +++ b/nodejs.json @@ -12,12 +12,12 @@ "hash": "2888f2303bcaa35f05b3dce7cbfee58af77dcea6bed4b9ff549b181c65eb4565" } }, - "env_add_path": ["nodejs", "$persist_dir"], - "persist": "nodejs/node_modules", + "extract_dir": "nodejs", + "persist": [ "bin" ], + "env_add_path": [ ".", "bin" ], "post_install": " -# Set npm prefix to install module inside $persist_dir -Set-Content -Value \"prefix=$persist_dir\" -Path $persist_dir\\node_modules\\npm\\npmrc -npm update -g", +# Set npm prefix to install modules inside bin +Set-Content -Value \"prefix=$dir\\bin\" -Path $dir\\node_modules\\npm\\npmrc", "checkver": { "url": "https://nodejs.org/en/download/current/", "re": "Current version: v([\\d.]+)"