summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/contrib/error.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/apt-pkg/contrib/error.cc b/apt-pkg/contrib/error.cc
index 2cb1191c1..e3cdb7566 100644
--- a/apt-pkg/contrib/error.cc
+++ b/apt-pkg/contrib/error.cc
@@ -252,11 +252,13 @@ void GlobalError::MergeWithStack() {
APT_HIDDEN std::ostream &operator<<(std::ostream &out, GlobalError::Item i)
{
static constexpr auto COLOR_RESET = "\033[0m";
+ static constexpr auto COLOR_BOLD = "\033[1m"; // bold neutral
static constexpr auto COLOR_NOTICE = "\033[1m"; // bold neutral
static constexpr auto COLOR_WARN = "\033[1;33m"; // bold yellow
static constexpr auto COLOR_ERROR = "\033[1;31m"; // bold red
bool use_color = _config->FindB("APT::Color", false);
+ auto out_ver = _config->FindI("APT::Output-Version");
if (use_color)
{
@@ -304,6 +306,8 @@ APT_HIDDEN std::ostream &operator<<(std::ostream &out, GlobalError::Item i)
case GlobalError::WARNING:
case GlobalError::NOTICE:
out << COLOR_RESET;
+ if (out_ver >= 30)
+ out << COLOR_BOLD;
break;
default:
break;