diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-06-20 13:49:31 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2016-06-20 13:49:31 +0200 |
commit | 9515ed7bcdb32c7985ca83d309beda7155d02136 (patch) | |
tree | b511a7fdc1f8ebd1efade89b5c362111c62d77ad /cmdline/apt-helper.cc | |
parent | cad1877559f3e1703c3fea4d081978e1b4bb4a0e (diff) |
implement and document DIRECT for auto-detect-proxy
There is a subtile difference between an empty setting and "DIRECT" in
the configuration as the later overrides the generic settings while the
earlier does not. Also, non-zero exitcodes should really be reported as
an error rather than silently discarded.
Diffstat (limited to 'cmdline/apt-helper.cc')
-rw-r--r-- | cmdline/apt-helper.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmdline/apt-helper.cc b/cmdline/apt-helper.cc index f3b8c326e..fd99fba8b 100644 --- a/cmdline/apt-helper.cc +++ b/cmdline/apt-helper.cc @@ -39,7 +39,8 @@ static bool DoAutoDetectProxy(CommandLine &CmdL) /*{{{*/ if (CmdL.FileSize() != 2) return _error->Error(_("Need one URL as argument")); URI ServerURL(CmdL.FileList[1]); - AutoDetectProxy(ServerURL); + if (AutoDetectProxy(ServerURL) == false) + return false; std::string SpecificProxy = _config->Find("Acquire::"+ServerURL.Access+"::Proxy::" + ServerURL.Host); ioprintf(std::cout, "Using proxy '%s' for URL '%s'\n", SpecificProxy.c_str(), std::string(ServerURL).c_str()); |