summaryrefslogtreecommitdiff
path: root/src/cmdline
diff options
context:
space:
mode:
authorDaniel Hartwig <mandyke@gmail.com>2012-04-25 18:07:21 +0800
committerDaniel Hartwig <mandyke@gmail.com>2012-04-25 18:07:21 +0800
commit8e201150ede627335a5587de6dfea897637c702c (patch)
treed5f9a1902a27ad067d81b8df074ef6b7fec6013e /src/cmdline
parentfd0f5f392d07d0cd739b6b75e49cf9af2d3f402b (diff)
downloadaptitude-8e201150ede627335a5587de6dfea897637c702c.tar.gz
Check for apt_init errors in cmdline_download.cc
Closes: #670379
Diffstat (limited to 'src/cmdline')
-rw-r--r--src/cmdline/cmdline_download.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cmdline/cmdline_download.cc b/src/cmdline/cmdline_download.cc
index 68329faf..655d6337 100644
--- a/src/cmdline/cmdline_download.cc
+++ b/src/cmdline/cmdline_download.cc
@@ -51,6 +51,12 @@ int cmdline_download(int argc, char *argv[])
shared_ptr<OpProgress> progress = make_text_progress(false, term, term, term);
apt_init(progress.get(), false);
+ if(_error->PendingError())
+ {
+ _error->DumpErrors();
+ return -1;
+ }
+
pkgSourceList list;
if(!list.ReadMainList())
{