pm2 icon indicating copy to clipboard operation
pm2 copied to clipboard

Using API, env vars can't be set for daemon spawn process

Open jgresham opened this issue 2 years ago • 0 comments

What's going wrong?

pm2.connect() doesn't accept env vars for when a new daemon https://pm2.keymetrics.io/docs/usage/pm2-api/

How could we reproduce this issue?

N/A

Supporting information

Code location where the env vars should be passed on to child_process.spawn https://github.com/Unitech/pm2/blob/master/lib/Daemon.js#L49 I may try to implement if pm2 team says this feature would be welcomed. Optionally, we could just implement passing an options object directly to the spawn call

jgresham avatar Jun 16 '22 16:06 jgresham