mirror of
https://github.com/flatpak/flatpak.git
synced 2026-04-04 23:25:54 -04:00
Disable fancy output when G_MESSAGES_DEBUG is set
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.
This commit is contained in:
committed by
Phaedrus Leeds
parent
12ebf8fd9a
commit
784bc5566d
@@ -721,6 +721,9 @@ flatpak_fancy_output (void)
|
||||
if (g_strcmp0 (g_getenv ("FLATPAK_FANCY_OUTPUT"), "0") == 0)
|
||||
return FALSE;
|
||||
|
||||
if (getenv ("G_MESSAGES_DEBUG"))
|
||||
return FALSE;
|
||||
|
||||
return isatty (STDOUT_FILENO);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user