From c4918efc1bb2b13288174d40e3dd6381ffe9a74f Mon Sep 17 00:00:00 2001 From: muxator Date: Sat, 14 Jul 2018 17:54:26 +0200 Subject: [PATCH] installDeps.sh: do not modify package.json when installing dependencies installDeps.sh's only side effect should be to actually install dependencies according to a configuration file, and not to modify it. Adding --no-save to the npm command line forces npm to have a read only access to package.json. Old npm versions seem to support --no-XXX style flags even if not documented (see https://github.com/npm/npm/issues/14285#issuecomment-254298519) Tested with npm 3.5.2 and 6.1.0 Fixes #3396 --- bin/installDeps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/installDeps.sh b/bin/installDeps.sh index 5ccba46dd..4c5a42fe9 100755 --- a/bin/installDeps.sh +++ b/bin/installDeps.sh @@ -73,7 +73,7 @@ echo "Ensure that all dependencies are up to date... If this is the first time cd node_modules [ -e ep_etherpad-lite ] || ln -s ../src ep_etherpad-lite cd ep_etherpad-lite - npm install --loglevel warn + npm install --no-save --loglevel warn ) || { rm -rf node_modules exit 1