Skip to content

Commit

Permalink
fix: now whenever there is an internal pm2 env var, skip pm2 env for …
Browse files Browse the repository at this point in the history
…starting Unitech#4761
  • Loading branch information
Unitech authored and remz committed Dec 29, 2020
1 parent 587a0ed commit 012dfaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Common.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ Common.prepareAppConf = function(opts, app) {

/**
* Do not copy internal pm2 environment variables if acting on process
* is made from a programmatic script started by PM2
* is made from a programmatic script started by PM2 or if a pm_id is present in env
*/
if (cst.PM2_PROGRAMMATIC)
if (cst.PM2_PROGRAMMATIC || process.env.pm_id)
Common.safeExtend(env, process.env);
else
env = process.env;
Expand Down

0 comments on commit 012dfaa

Please sign in to comment.