summaryrefslogtreecommitdiff
path: root/methods/aptmethod.h
diff options
context:
space:
mode:
Diffstat (limited to 'methods/aptmethod.h')
-rw-r--r--methods/aptmethod.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/methods/aptmethod.h b/methods/aptmethod.h
index 5d792ceb7..de931dd7e 100644
--- a/methods/aptmethod.h
+++ b/methods/aptmethod.h
@@ -525,6 +525,7 @@ class aptAuthConfMethod : public aptMethod
if (uri.User.empty() == false || uri.Password.empty() == false)
return true;
+ _error->PushToStack();
for (auto &authconf : authconfs)
{
if (authconf->IsOpen() == false)
@@ -538,6 +539,17 @@ class aptAuthConfMethod : public aptMethod
result &= MaybeAddAuth(*authconf, uri);
}
+ if (not _error->empty())
+ {
+ std::string message;
+ while (not _error->empty())
+ {
+ _error->PopMessage(message);
+ Warning("%s", message.c_str());
+ }
+ }
+ _error->RevertToStack();
+
return result;
}