Add a helper for formatted output

For now this just uses isatty(), but we might
allow overriding this with an environment variable
in the future.
tingping/wmclass
Matthias Clasen 2017-05-02 10:03:45 -04:00 committed by Alexander Larsson
parent de2c6cc85b
commit ecc90b95e7
2 changed files with 8 additions and 0 deletions

View File

@ -506,6 +506,12 @@ flatpak_is_in_sandbox (void)
return in_sandbox == 1;
}
gboolean
flatpak_fancy_output (void)
{
return isatty (STDOUT_FILENO);
}
const char *
flatpak_get_bwrap (void)
{

View File

@ -65,6 +65,8 @@ const char * flatpak_path_match_prefix (const char *pattern,
gboolean flatpak_is_in_sandbox (void);
gboolean flatpak_fancy_output (void);
const char * flatpak_get_arch (void);
const char ** flatpak_get_arches (void);
gboolean flatpak_is_linux32_arch (const char *arch);