1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add --no-audit flag to npm commands to reduce overhead

This commit is contained in:
Nick O'Leary 2019-03-05 10:17:30 +00:00
parent fab796e4e4
commit c3b9982c44
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -104,7 +104,7 @@ function installModule(module,version) {
} }
var installDir = settings.userDir || process.env.NODE_RED_HOME || "."; var installDir = settings.userDir || process.env.NODE_RED_HOME || ".";
var args = ['install','--save','--save-prefix="~"','--production',installName]; var args = ['install','--no-audit','--save','--save-prefix="~"','--production',installName];
log.trace(npmCommand + JSON.stringify(args)); log.trace(npmCommand + JSON.stringify(args));
exec.run(npmCommand,args,{ exec.run(npmCommand,args,{
cwd: installDir cwd: installDir
@ -197,7 +197,7 @@ function uninstallModule(module) {
var list = registry.removeModule(module); var list = registry.removeModule(module);
log.info(log._("server.install.uninstalling",{name:module})); log.info(log._("server.install.uninstalling",{name:module}));
var args = ['remove','--save',module]; var args = ['remove','--no-audit','--save',module];
log.trace(npmCommand + JSON.stringify(args)); log.trace(npmCommand + JSON.stringify(args));
exec.run(npmCommand,args,{ exec.run(npmCommand,args,{