mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
Remove duplicate setting of node_args as default array
This commit is contained in:
parent
213f48641b
commit
0ec85bc091
@ -106,6 +106,10 @@ Common.prepareAppConf = function(opts, app) {
|
||||
app.node_args = [];
|
||||
}
|
||||
|
||||
if (app.port && app.env) {
|
||||
app.env.PORT = app.port;
|
||||
}
|
||||
|
||||
// CWD option resolving
|
||||
cwd && (cwd[0] != '/') && (cwd = path.resolve(process.cwd(), cwd));
|
||||
cwd = cwd || opts.cwd;
|
||||
@ -468,7 +472,7 @@ Common.safeExtend = function(origin, add){
|
||||
if (!add || typeof add != 'object') return origin;
|
||||
|
||||
//Ignore PM2's set environment variables from the nested env
|
||||
var keysToIgnore = ['name', 'exec_mode', 'env', 'args', 'pm_cwd', 'exec_interpreter', 'pm_exec_path', 'node_args', 'pm_out_log_path', 'pm_err_log_path', 'pm_pid_path', 'pm_id', 'status', 'pm_uptime', 'created_at', 'unstable_restarts', 'restart_time', 'axm_actions', 'pmx_module', 'command', 'watch', 'versioning', 'vizion_runing', 'MODULE_DEBUG', 'pmx', 'axm_options', 'created_at', 'watch', 'vizion', 'axm_dynamic', 'axm_monitor', 'instances', 'automation', 'autorestart', 'node_args', 'unstable_restart', 'treekill', 'exit_code', 'vizion'];
|
||||
var keysToIgnore = ['name', 'exec_mode', 'env', 'args', 'pm_cwd', 'exec_interpreter', 'pm_exec_path', 'node_args', 'pm_out_log_path', 'pm_err_log_path', 'pm_pid_path', 'pm_id', 'status', 'pm_uptime', 'created_at', 'unstable_restarts', 'restart_time', 'axm_actions', 'pmx_module', 'command', 'watch', 'versioning', 'vizion_runing', 'MODULE_DEBUG', 'pmx', 'axm_options', 'created_at', 'watch', 'vizion', 'axm_dynamic', 'axm_monitor', 'instances', 'automation', 'autorestart', 'unstable_restart', 'treekill', 'exit_code', 'vizion'];
|
||||
|
||||
var keys = Object.keys(add);
|
||||
var i = keys.length;
|
||||
@ -704,14 +708,6 @@ Common.verifyConfs = function(appConfs) {
|
||||
app.merge_logs = true;
|
||||
}
|
||||
|
||||
if (!app.node_args) {
|
||||
app.node_args = [];
|
||||
}
|
||||
|
||||
if (app.port && app.env) {
|
||||
app.env.PORT = app.port;
|
||||
}
|
||||
|
||||
var ret;
|
||||
if ((ret = Common.sink.determineCron(app)) instanceof Error)
|
||||
return ret;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user