From 9515ed7bcdb32c7985ca83d309beda7155d02136 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 20 Jun 2016 13:49:31 +0200 Subject: 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. --- cmdline/apt-helper.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmdline/apt-helper.cc') 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()); -- cgit v1.2.3