Merge pull request #4563 from kimhc999/fix/get-pm2-path-fix

Fix an error for pm2 path on Windows.
This commit is contained in:
Alexandre Strzelewicz 2020-01-20 11:56:06 +01:00 committed by GitHub
commit fda26d0e4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,7 @@ Daemon.prototype.start = function() {
console.error('[PM2] Resurrecting PM2');
var path = cst.IS_WINDOWS ? process.cwd() + '/bin/pm2' : process.env['_'];
var path = cst.IS_WINDOWS ? __dirname + '/../bin/pm2' : process.env['_'];
var fork_new_pm2 = require('child_process').spawn('node', [path, 'update'], {
detached: true,
stdio: 'inherit'