From 61b3b1840568b223baad08da1eb9a1fb5d6e7f91 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 20 Mar 2025 15:16:58 +0100 Subject: solver3: Avoid empty error message in evaluation crash report whoopsie does not accept empty values --- apt-private/private-install.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'apt-private') diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc index cf92f91ad..f1211d25e 100644 --- a/apt-private/private-install.cc +++ b/apt-private/private-install.cc @@ -124,9 +124,12 @@ static void WriteApportReport(pkgCacheFile &Cache, std::string &title, std::vect << "Title: " << title << "\n" << "SourcePackage: apt\n"; - crash << "ErrorMessage:\n"; - for (auto &error : errors) - crash << " " << error << "\n"; + if (not errors.empty()) + { + crash << "ErrorMessage:\n"; + for (auto &error : errors) + crash << " " << error << "\n"; + } std::ifstream toCopy(edspDump.Name()); std::ostringstream readStream; -- cgit v1.2.3-70-g09d2