Skip to content
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

Info messages going to stdout #54

Open
ComedyTomedy opened this issue Jul 12, 2022 · 2 comments
Open

Info messages going to stdout #54

ComedyTomedy opened this issue Jul 12, 2022 · 2 comments

Comments

@ComedyTomedy
Copy link

Hello! When I login & run

$ chec request GET /v1/products > chec.json

I'm suprised to find the first line of output is - Processing...\n before the JSON data starts.

Shouldn't this be sent to stderr, so my shell redirect produces a valid JSON file?

@ComedyTomedy
Copy link
Author

For now I'll pipe through sed '/^- /d' since I'm fairly sure that pattern can't occur in valid JSON anyway :)

@ComedyTomedy
Copy link
Author

I now think it's my expectations that are wrong. So maybe consider this a feature request.

When there's an error, the info messages go to stdout and the JSON to stderr (which is the opposite of what I'd expect in a unix tool), but also the JSON is prefixed by " ›" on every line, making it unparseable.

I was assuming the goal was to be able to chec ... | jq ..., which would be useful to me for hacking together a quick data validation script.

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

No branches or pull requests

1 participant