-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support a cwd option in JSON files #295
Comments
Hello Quentin (: Yes I think I should switch this line : https://github.com/Unitech/pm2/blob/master/lib/ProcessContainer.js#L63
to
|
It seems right at first but I don't think this is that simple. I have some applications where the main file is in a subfolder like I would :
app = Common.resolveAppPaths(app, cwd); to app = Common.resolveAppPaths(app, app.cwd || cwd);
process.chdir(process.env.pm_cwd || p.dirname(script));
|
I updated my previous post to correct an obvious issue. |
Thanks for these advises, I'm looking to implement them |
You're welcome. |
👍 |
This! We need this. |
+1 |
Ok done ! It will be available in the 0.8.7 |
Cool ! Thanks a lot ! |
This correctly launches the app with a relative path but the true |
The cwd of the process doesn't seem to change. I have several apps that open log files with relative paths (e.g. I would expect iminpath1 to log |
Could you please use the pm2 in the master and tell me if it works now ?
Thanks |
Thank you so much! It seems to work fine now :-) |
Great ! I just published the 0.8.12 with this fix |
Not working for me in 1.1.2. cwd is not respecetd... running process description: What am I doing wrong? |
@stevethibault Could you please show us the error ? |
You can see in the post pm2 description command output that the cwd is not On Aug 8, 2016 6:03 PM, "vmarchaud" notifications@github.com wrote:
|
@stevethibault Set the script to |
Ok. On Aug 8, 2016 6:26 PM, "vmarchaud" notifications@github.com wrote:
|
That did the trick. Awesome. Thank you for the help. On Mon, Aug 8, 2016 at 6:29 PM, Steve Thibault steve@patternsoft.net
|
It would be great to be able to add a cwd parameter in the JSON file just like so :
That would help a lot. Especially when some modules do require that cwd is proper to work as intended. I have to add some
process.chdir(__dirname)
in my index.js files to cope with this and don't like it.The text was updated successfully, but these errors were encountered: