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

Disable fancy output under G_MESSAGES_DEBUG and cache result #4767

Merged
merged 2 commits into from
Feb 21, 2022

Conversation

mwleeds
Copy link
Collaborator

@mwleeds mwleeds commented Feb 21, 2022

No description provided.

Just as we already call flatpak_disable_fancy_output() in
flatpak_option_context_parse() in case verbose output is enabled via CLI
options, disable fancy output in case verbose output was enabled via the
G_MESSAGES_DEBUG env var. Without this change, the result of doing e.g.
$ G_MESSAGES_DEBUG=OSTree flatpak install ...
is pretty useless and ugly, when the output isn't being redirected to a
file, since the debug messages are overwritten when we redraw to show
progress updates.

This makes the output of "flatpak list" a bit ugly when G_MESSAGES_DEBUG
is set, but it seems like a small price to pay.
There might be performance issues with doing this many times, so cache
the result.
@mwleeds mwleeds merged commit 86254d5 into main Feb 21, 2022
@mwleeds mwleeds deleted the mwleeds/disable-fancy-output-more branch February 21, 2022 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants