Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant