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

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

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

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

Comments

@jzorn
Copy link
Contributor

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.
helloanoop added a commit that referenced this issue Jun 5, 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.

Co-authored-by: Anoop M D <[email protected]>
helloanoop added a commit that referenced this issue Jun 5, 2024
helloanoop added a commit that referenced this issue Jun 5, 2024
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.

2 participants