Unitech / pm2

Node.js Production Process Manager with a built-in Load Balancer.
https://pm2.keymetrics.io/docs/usage/quick-start/
Other
41.59k stars 2.62k forks source link

pm2 startup copies whole path of executing user and prepends it! #5911

Open jeffrson opened 3 weeks ago

jeffrson commented 3 weeks ago

What's going wrong?

Calling pm2 startup generates the following command: sudo env PATH=$PATH:/..path_of_current_node.. /..path_of_current_pm2 startup systemd -u user --hp /home/user

So if "path_of_current_node" is a special version (manually executed) it will not be used, if $PATH of user contains another version.

How could we reproduce this issue?

pm2 startup

Supporting information

pm2 5.4.2