Print the output of bref command as is - #59
Merged
Merged
Conversation
mnapoli
added this pull request to stack #60
September 27, 2026 20:18
It was written through Symfony Console's formatter, so text from the application that looks like its tags was interpreted: `<href=...>` became a terminal hyperlink, `<info>` and `<error>` became colors, or disappeared when the output is not a terminal. Claude-Session: https://claude.ai/code/session_01Awk33iZ9mDSg1xgSAPkgGK
mnapoli
force-pushed
the
command-raw-output
branch
from
September 28, 2026 12:29
5ef33a4 to
4aa0125
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #57.
bref commandwrote the output of the command through Symfony Console's formatter, so text from the application that looks like its tags was interpreted rather than printed:<href=https://...>text</>became a terminal hyperlink,<info>,<comment>,<error>became colors when the output is a terminal, and disappeared when it is piped or redirected.The output of an application is not written for Symfony Console's formatter (and it can contain data from the application's database), so it's now written with
OutputInterface::OUTPUT_RAW, exactly as received: the success output, and the output of a failed command under itsERRORheader. The CLI's own lines (spinner, headers) keep their formatting.Colors requested with
--ansi(#57) are raw escape codes, so they're not affected.Tested with a new case in
CommandTest:Hello <info>world</info>, <href=https://example.com>a link</>comes out verbatim, in a terminal and piped, for a successful and a failed command.