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

cli: add the ability to output to /dev/stdout #2123

Open
1 task done
jzorn opened this issue Apr 18, 2024 · 0 comments · May be fixed by #2125
Open
1 task done

cli: add the ability to output to /dev/stdout #2123

jzorn opened this issue Apr 18, 2024 · 0 comments · May be fixed by #2125
Labels
enhancement New feature or request

Comments

@jzorn
Copy link

jzorn commented Apr 18, 2024

I have checked the following:

  • I've searched existing issues and found nothing related to my issue.

Describe the feature you want to add

It is helpful to print the results of a collection run to stdout, as it is currently possible via bru run --output /dev/stdout. Some commands are adding additional output to stdout, e.g. when running a recursive collection Running Folder Recursively. This output prevents output processing in a pipeline, e.g. via bru run --output /dev/stdout | jq. By moving the non-result output to a different output stream, e.g. stderr, pipelines would be much easier to compose.

Mockups or Images of the feature

$ bru run --output /dev/stdout | jq
[ignored output on stderr]
{
  "summary": {
    "totalRequests": 1,
    "passedRequests": 1,
    "failedRequests": 0,
    "totalAssertions": 0,
    "passedAssertions": 0,
...
}
@jzorn jzorn added the enhancement New feature or request label Apr 18, 2024
jzorn added a commit to jzorn/bruno that referenced this issue Apr 18, 2024
This change moves informational command outputs from console.log (prints on stdout) to console.warn/console.error (prints on stderr)
to enable stdout processing in pipelines.
jzorn added a commit to jzorn/bruno that referenced this issue Apr 18, 2024
This change moves informational command outputs from console.log (prints on stdout) to console.warn/console.error (prints on stderr)
to enable stdout processing in pipelines.
@jzorn jzorn linked a pull request Apr 18, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant