You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
the code inside the PM2Tracker.js get the wrong pm2.pid path.
Using var PM2_HOME = process.env.HOME + '/' + (process.env.PM2_HOME || '.pm2');,
the code prepend the user home directory to the PM2_HOME environment variable and according to the code on node_modules/pm2/paths.js
I think can be useful modify the code like this if (process.env.PM2_HOME) PM2_HOME = process.env.PM2_HOME; else if (process.env.HOME && !process.env.HOMEPATH) PM2_HOME = p.resolve(process.env.HOME, '.pm2'); else if (process.env.HOME || process.env.HOMEPATH) PM2_HOME = p.resolve(process.env.HOMEDRIVE, process.env.HOME || process.env.HOMEPATH, '.pm2'); else { console.error('[PM2][Initialization] Environment variable HOME (Linux) or HOMEPATH (Windows) are not set!'); console.error('[PM2][Initialization] Defaulting to /etc/.pm2'); PM2_ROOT_PATH = p.resolve('/etc', '.pm2'); }
The text was updated successfully, but these errors were encountered:
Hi
the code inside the PM2Tracker.js get the wrong pm2.pid path.
Using var PM2_HOME = process.env.HOME + '/' + (process.env.PM2_HOME || '.pm2');,
the code prepend the user home directory to the PM2_HOME environment variable and according to the code on node_modules/pm2/paths.js
I think can be useful modify the code like this
if (process.env.PM2_HOME) PM2_HOME = process.env.PM2_HOME; else if (process.env.HOME && !process.env.HOMEPATH) PM2_HOME = p.resolve(process.env.HOME, '.pm2'); else if (process.env.HOME || process.env.HOMEPATH) PM2_HOME = p.resolve(process.env.HOMEDRIVE, process.env.HOME || process.env.HOMEPATH, '.pm2'); else { console.error('[PM2][Initialization] Environment variable HOME (Linux) or HOMEPATH (Windows) are not set!'); console.error('[PM2][Initialization] Defaulting to /etc/.pm2'); PM2_ROOT_PATH = p.resolve('/etc', '.pm2'); }
The text was updated successfully, but these errors were encountered: