Skip to content

Adds --json flag to output JSON to STDOUT#41

Merged
tarcieri merged 4 commits intorustsec:masterfrom
colindean:colindean/json-output
Oct 25, 2018
Merged

Adds --json flag to output JSON to STDOUT#41
tarcieri merged 4 commits intorustsec:masterfrom
colindean:colindean/json-output

Conversation

@colindean
Copy link
Copy Markdown
Contributor

@colindean colindean commented Aug 1, 2018

Fixes #40

⚠️ This cannot be merged until

lazy_static = "1"
platforms = "0.1"
rustsec = "0.9"
rustsec = "0.9.3"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tarcieri I realized just moments after I changed this to 0.9.3 that maybe it should be less specific. What should it be?

…Or you could merge it and change it to be less specific in another commit…

@tarcieri
Copy link
Copy Markdown
Member

@colindean as it were I just released 0.9.3, so that's fine...

@colindean
Copy link
Copy Markdown
Contributor Author

…Gonna rebase.

Flag is added and it works as a proof-of-concept, but it's difficult to
get the JSON out of the output because _everything_ is output to STDOUT.
All other output text goes to STDERR.

I'm not particularly happy with the implementation of deciding which io
fd to use. I tried to put it into a variable just above it but got the
frustrating and unhelpful error "cannot move out of captured outer
variable…" so I did it like this until someone can clean it up.
@colindean
Copy link
Copy Markdown
Contributor Author

It looks like this is good to go!

@tarcieri tarcieri merged commit 4406814 into rustsec:master Oct 25, 2018
@tarcieri
Copy link
Copy Markdown
Member

Great, thanks! And sorry it took so long

@colindean colindean deleted the colindean/json-output branch October 25, 2018 13:16
@colindean
Copy link
Copy Markdown
Contributor Author

🎉

@tarcieri tarcieri mentioned this pull request Dec 15, 2018
tarcieri added a commit that referenced this pull request May 7, 2021
…vulns-pkgs

Derive Serialize for Packages, Vulnerabilities, and Vulnerability
tarcieri added a commit that referenced this pull request May 7, 2021
tarcieri added a commit that referenced this pull request May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants