]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-helper.cc
travis: Move codecov from after_success to after_script
[apt.git] / cmdline / apt-helper.cc
index fd4d269c2f52003e153cd3d062917ae0a704e43f..a6f88ad06c6c25c35502de2c647f379d96f54ea5 100644 (file)
@@ -29,6 +29,7 @@
 #include <string>
 #include <vector>
 
+#include <unistd.h>
 #include <stdlib.h>
 
 #include <apti18n.h>
@@ -39,7 +40,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());
@@ -199,8 +201,6 @@ static std::vector<aptDispatchWithHelp> GetCommands()                       /*{{{*/
                                                                        /*}}}*/
 int main(int argc,const char *argv[])                                  /*{{{*/
 {
-   InitLocale();
-
    CommandLine CmdL;
    auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT_HELPER, &_config, &_system, argc, argv, &ShowHelp, &GetCommands);