From c974318686ced66546861494509d2ee93fc110d9 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sat, 13 Mar 2021 20:36:46 +0100 Subject: [PATCH] pipewire: disable colors when NO_COLOR is set See no-color.org --- src/pipewire/pipewire.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pipewire/pipewire.c b/src/pipewire/pipewire.c index 44a49448f..d5d69c359 100644 --- a/src/pipewire/pipewire.c +++ b/src/pipewire/pipewire.c @@ -426,7 +426,8 @@ void pw_init(int *argc, char **argv[]) if (pw_log_is_default()) { n_items = 0; - items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_LOG_COLORS, "true"); + if (getenv("NO_COLOR") == NULL) + items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_LOG_COLORS, "true"); items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_LOG_TIMESTAMP, "true"); items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_LOG_LINE, "true"); snprintf(level, sizeof(level), "%d", pw_log_level);