-
Notifications
You must be signed in to change notification settings - Fork 62
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
Option to output as json #56
Comments
Hi @jrschumacher! No, there's no support for that yet sorry. |
Hi @germanrcuriel , I'd be happy to add JSON as output format. What do you think about adding an option --format which could be json and later others too live csv? |
@tibu Sure! It would be a nice feature! |
this has been done with but somehow piping it to jq doesn't work with error |
@palashkulsh I figured out the reason for the jq error. It's caused by a common issue with node cli scripts that make async network calls. If the script calls
as a result, you can commenting out line 37 in bin/jira.js resolves this. Afterward you can do a simple:
|
Awesome !! thanks @RichardBronosky it works. Before pushing this change I am thinking what would be the downside of not doing process.exit(0) . any thought? |
I'm not sure about downsides. Based on nodejs/node#3669 (comment) and nodejs/node#2972 (comment) (both comments by the same user, mind you) seems like the downsides are on using it. I'm looking into nodejs/node#6456 to see what other option there is. Also, I have a PR coming that adds the option to get json output from the ls command. |
will be removing the exit part. |
fixes #56 as process.exit does not wait for stdout
`jira ls --help` will show that `jira ls -j 1` works just like `jira jql -j1 '...'`
My PR https://github.com/germanrcuriel/jira-cmd/pull/89 uses the nodejs/node#6456 method instead of the change you made (at my indication) in https://github.com/germanrcuriel/jira-cmd/pull/88 I don't care which way you address the buffer issue. I can modify my branch if you want to keep your change. Just let me know. |
Surething @RichardBronosky , will let you know. Due to some time crunch for next 4-5 hours, will test post that. |
fixes #56 as process.exit does not wait for stdout
Is there an option to output content as json rather than in an ascii table?
The text was updated successfully, but these errors were encountered: