Skip to content

stderr is piped to stdout #17

@erikeah

Description

@erikeah

How to replicate error:

This ain file should output connection headers to stderr and print a json to stdout.

[Host]
http://localhost:3000/places

[Headers]
Content-Type: application/json

[Backend]
curl

[BackendOptions]
-sS -D /dev/stderr

But what actually happen is that stderr (the headers) are printed on stdout.

You can check this by running this line and reviewing the content of headers.txt file:

ain the_code_provided.ain 2>headers.txt

Why I consider that this should not be like this?

  1. Because as user I expect to be printed to stderr
  2. Because stderr could be used for logging and will allow to do this with the provided example :
ain the_code_provided.ain | jq

And don't make crash the jq parser.

Thanks in advanced!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions