If the config file does not specify any useColors directive, zypper
will always fill _config.useColors variable with an empty string,
overriding whatever else there was in the C++ source files. Redact
this behavior and do not override the class defaults.
---
 src/Config.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/Config.cc b/src/Config.cc
index 3da52f4..a9baabf 100644
--- a/src/Config.cc
+++ b/src/Config.cc
@@ -194,7 +194,9 @@ void Config::read(const string & file)
 
     // ---------------[ colors 
]------------------------------------------------
 
-    color_useColors = 
augeas.getOption(ConfigOption::COLOR_USE_COLORS.asString());
+    s = augeas.getOption(ConfigOption::COLOR_USE_COLORS.asString());
+    if (!s.empty())
+            color_useColors = s;
     do_colors =
       (color_useColors == "autodetect" && has_colors())
       || color_useColors == "always";
-- 
1.8.4

-- 
To unsubscribe, e-mail: zypp-devel+unsubscr...@opensuse.org
To contact the owner, e-mail: zypp-devel+ow...@opensuse.org

Reply via email to