[tracker-miners/wip/carlosg/status-output-fix] cli: Fix inverted condition




commit 4109ab8b525b284fdee9cbfd931c896ee3c7d59d
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Apr 24 12:05:27 2022 +0200

    cli: Fix inverted condition
    
    Fix thinko in boolean handling introduced in commit 71234ebf4d,
    since the variable name started off as "escape_sequences" that
    suggested the inverted value. We want to use escape sequences
    when not piped to a file.

 src/tracker/tracker-status.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/tracker/tracker-status.c b/src/tracker/tracker-status.c
index 90b7ba264..3030101ee 100644
--- a/src/tracker/tracker-status.c
+++ b/src/tracker/tracker-status.c
@@ -488,19 +488,19 @@ show_errors (gchar    **terms,
                                gchar *message = g_key_file_get_string (keyfile, GROUP, KEY_MESSAGE, NULL);
 
                                found = TRUE;
-                               g_print (piped ?
+                               g_print (!piped ?
                                         BOLD_BEGIN "URI:" BOLD_END " %s\n" :
                                         "URI: %s\n", uri);
 
                                if (message) {
-                                       g_print (piped ?
+                                       g_print (!piped ?
                                                 BOLD_BEGIN "%s:" BOLD_END " %s\n" :
                                                 "%s: %s\n",
                                                 _("Message"), message);
                                }
 
                                if (sparql) {
-                                       g_print (piped ?
+                                       g_print (!piped ?
                                                 BOLD_BEGIN "SPARQL:" BOLD_END " %s\n" :
                                                 "SPARQL: %s\n",
                                                 sparql);
@@ -518,7 +518,7 @@ show_errors (gchar    **terms,
        }
 
        if (!found) {
-               g_print (piped ?
+               g_print (!piped ?
                         BOLD_BEGIN "%s" BOLD_END "\n" :
                         "%s\n",
                         _("No reports found"));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]