Persistence: prevent NPM from overwriting node_modules by setting read-only attribute on the persisted directory junction.

This commit is contained in:
Luke Sampson 2017-03-24 19:09:28 +11:00 committed by Rémy
parent 5bfd9daff8
commit bea5cd1827

View File

@ -13,9 +13,10 @@
} }
}, },
"env_add_path": "nodejs", "env_add_path": "nodejs",
"persist": "nodejs/node_modules",
"post_install": " "post_install": "
# Remove npmrc that makes global modules get installed in AppData\\Roaming\\npm # Remove npmrc that makes global modules get installed in AppData\\Roaming\\npm
rm $dir\\nodejs\\node_modules\\npm\\npmrc if(test-path $dir\\nodejs\\node_modules\\npm\\npmrc) { rm $dir\\nodejs\\node_modules\\npm\\npmrc }
npm update -g", npm update -g",
"checkver": { "checkver": {
"url": "https://nodejs.org/en/download/current/", "url": "https://nodejs.org/en/download/current/",