mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
bugfix: fixes #3096
This commit is contained in:
parent
11dddfc843
commit
cc0f0aa809
@ -169,15 +169,15 @@ function installModule(CLI, module_name, opts, cb) {
|
||||
Common.printError(e);
|
||||
}
|
||||
|
||||
Common.extend(opts, {
|
||||
opts = Common.extend(opts, {
|
||||
cmd : cmd,
|
||||
development_mode : development_mode,
|
||||
proc_path : proc_path
|
||||
});
|
||||
|
||||
Configuration.set(MODULE_CONF_PREFIX + ':' + canonic_module_name, {
|
||||
uid : opts.uid || null,
|
||||
gid : opts.gid || null
|
||||
uid : opts.uid,
|
||||
gid : opts.gid
|
||||
}, function(err, data) {
|
||||
|
||||
startModule(CLI, opts, function(err, dt) {
|
||||
|
||||
@ -445,8 +445,13 @@ Common.printOut = function() {
|
||||
/**
|
||||
* Raw extend
|
||||
*/
|
||||
Common.extend = function(destination, source){
|
||||
if (!source || typeof source != 'object') return destination;
|
||||
Common.extend = function(destination, source) {
|
||||
if (typeof destination !== 'object') {
|
||||
destination = {};
|
||||
}
|
||||
if (!source || typeof source !== 'object') {
|
||||
return destination;
|
||||
}
|
||||
|
||||
Object.keys(source).forEach(function(new_key) {
|
||||
if (source[new_key] != '[object Object]')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user