doczkal / rpms / abrt

Forked from rpms/abrt 4 years ago
Clone

Blame SOURCES/0312-cli-load-config-file-at-the-beginning.patch

f9f924
From 079ca6cf8774ce4b510daa9423a3785007c6c1d7 Mon Sep 17 00:00:00 2001
f9f924
From: Matej Habrnal <mhabrnal@redhat.com>
f9f924
Date: Mon, 17 Sep 2018 16:16:23 +0200
f9f924
Subject: [PATCH] cli: load config file at the beginning
f9f924
f9f924
Resolves: #1618818
f9f924
f9f924
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
f9f924
---
f9f924
 src/cli/abrt-cli.c | 1 +
f9f924
 src/cli/list.c     | 1 -
f9f924
 src/cli/report.c   | 1 -
f9f924
 3 files changed, 1 insertion(+), 2 deletions(-)
f9f924
f9f924
diff --git a/src/cli/abrt-cli.c b/src/cli/abrt-cli.c
f9f924
index 360e4757e..6660923d4 100644
f9f924
--- a/src/cli/abrt-cli.c
f9f924
+++ b/src/cli/abrt-cli.c
f9f924
@@ -122,6 +122,7 @@ int main(int argc, const char **argv)
f9f924
 #endif
f9f924
 
f9f924
     abrt_init((char **)argv);
f9f924
+    load_abrt_conf();
f9f924
 
f9f924
     argv++;
f9f924
     argc--;
f9f924
diff --git a/src/cli/list.c b/src/cli/list.c
f9f924
index e688d2f49..5af42fb01 100644
f9f924
--- a/src/cli/list.c
f9f924
+++ b/src/cli/list.c
f9f924
@@ -206,7 +206,6 @@ int cmd_list(int argc, const char **argv)
f9f924
     free_vector_of_problem_data(ci);
f9f924
 
f9f924
 #if SUGGEST_AUTOREPORTING != 0
f9f924
-    load_abrt_conf();
f9f924
     if (!g_settings_autoreporting)
f9f924
     {
f9f924
         if (output)
f9f924
diff --git a/src/cli/report.c b/src/cli/report.c
f9f924
index a76923f22..c98d8cbf8 100644
f9f924
--- a/src/cli/report.c
f9f924
+++ b/src/cli/report.c
f9f924
@@ -116,7 +116,6 @@ int cmd_report(int argc, const char **argv)
f9f924
 
f9f924
     export_abrt_envvars(/*prog_prefix:*/ 0);
f9f924
 
f9f924
-    load_abrt_conf();
f9f924
     free_abrt_conf_data();
f9f924
 
f9f924
     int report_flags = 0;
f9f924
-- 
f9f924
2.17.2
f9f924