summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2024-04-13 22:04:15 +0200
committerJulian Andres Klode <jak@debian.org>2024-04-13 22:04:15 +0200
commit0ea8b5a34118d57e8aad7229360a5acafa1d1c1e (patch)
treee59125270ef4b7b9a1e649e28a063f5dbd0a3a90
parent964ffc6664d7301c9947c4c83656846b4789f097 (diff)
Use "Continue anyway?" if a warning is queued
-rw-r--r--apt-private/private-install.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc
index b5dd895bc..b53aea167 100644
--- a/apt-private/private-install.cc
+++ b/apt-private/private-install.cc
@@ -441,7 +441,8 @@ bool InstallPackages(CacheFile &Cache, APT::PackageVector &HeldBackPackages, boo
if (_config->FindI("quiet",0) < 2 &&
_config->FindB("APT::Get::Assume-Yes",false) == false)
{
- if (YnPrompt(outVer < 30 ? _("Do you want to continue?") : _("Continue?")) == false)
+ // YnPrompt shows all warnings before prompting, so ask stronger if we have any
+ if (YnPrompt(outVer < 30 ? _("Do you want to continue?") : (_error->empty() ? _("Continue?") : _("Continue anyway?"))) == false)
{
c2out << _("Abort.") << std::endl;
exit(1);