mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Allow a user to install missing modules from project settings
This commit is contained in:
@@ -99,7 +99,10 @@ function installModule(module,version) {
|
||||
}
|
||||
|
||||
var installDir = settings.userDir || process.env.NODE_RED_HOME || ".";
|
||||
var child = child_process.execFile(npmCommand,['install','--save','--save-prefix="~"','--production',installName],
|
||||
|
||||
var args = ['install','--save','--save-prefix="~"','--production',installName];
|
||||
log.trace(npmCommand + JSON.stringify(args));
|
||||
var child = child_process.execFile(npmCommand,args,
|
||||
{
|
||||
cwd: installDir
|
||||
},
|
||||
@@ -186,7 +189,11 @@ function uninstallModule(module) {
|
||||
|
||||
var list = registry.removeModule(module);
|
||||
log.info(log._("server.install.uninstalling",{name:module}));
|
||||
var child = child_process.execFile(npmCommand,['remove','--save',module],
|
||||
|
||||
var args = ['remove','--save',module];
|
||||
log.trace(npmCommand + JSON.stringify(args));
|
||||
|
||||
var child = child_process.execFile(npmCommand,args,
|
||||
{
|
||||
cwd: installDir
|
||||
},
|
||||
|
Reference in New Issue
Block a user