-
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
pm2 jlist outputs more than json #281
Comments
Additionally, when the daemon has been killed, on the first run afterwards an object is output from Satan.js in addition to the empty process list, like so:
Any scripts that expect process list output, but that are not written to handle that initial object will break on the first run. Would it be possible to suppress the initial object, especially with the -s switch? |
version 0.8.11 ok:
too silent:
too silent:
includes non json:
|
pm2 -V 0.9.2 is still outputting non-json when asked to output json.. please add to 0.9.x roadmap :) |
It got a little worse for me, because skipping stdout until first '[' breaks now too. not sure how to workaround this one:
|
Fixed here: #627 |
I applied patch 2734f41 locally to verify.
|
This kind of stuff should be in |
available in upcoming release |
When running pm2 for the first time:
vagrant@precise64:
$ rm -rf .pm2/$ pm2 jlist -svagrant@precise64:
Initializing folder for pm2 on /home/vagrant/.pm2
Creating PM2 configuration file in /home/vagrant/.pm2/custom_options.sh
[]
It would be nice if the "Initializing .. options.sh" part would be suppressed as:
vagrant@precise64:
$ rm -rf .pm2/$ pm2 jlist -s | json_ppvagrant@precise64:
malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Initializing folder ...") at /usr/bin/json_pp line 44
The text was updated successfully, but these errors were encountered: