about summary refs log tree commit diff
path: root/src/libmain
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-06-17T07·57+0200
committerEelco Dolstra <edolstra@gmail.com>2019-06-25T10·45+0200
commit09dde33c19129b949a064d35e248a3e318178b08 (patch)
treee0158028616c7f27869700b68b29ecde270e7399 /src/libmain
parent5600b070a766b83200a68d3632793917cf19a550 (diff)
Automatically use --no-net if there are no network interfaces
(cherry picked from commit 04a59769963fe2a28d10ba15de743fe499333c80)
Diffstat (limited to 'src/libmain')
-rw-r--r--src/libmain/common-args.cc11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/libmain/common-args.cc b/src/libmain/common-args.cc
index 0486932b20e7..9e1d7cee60e6 100644
--- a/src/libmain/common-args.cc
+++ b/src/libmain/common-args.cc
@@ -1,6 +1,5 @@
 #include "common-args.hh"
 #include "globals.hh"
-#include "download.hh"
 
 namespace nix {
 
@@ -45,16 +44,6 @@ MixCommonArgs::MixCommonArgs(const string & programName)
             settings.set("max-jobs", s);
         });
 
-    mkFlag()
-        .longName("no-net")
-        .description("disable substituters and consider all previously downloaded files up-to-date")
-        .handler([]() {
-            settings.useSubstitutes = false;
-            settings.tarballTtl = std::numeric_limits<unsigned int>::max();
-            downloadSettings.tries = 0;
-            downloadSettings.connectTimeout = 1;
-        });
-
     std::string cat = "config";
     globalConfig.convertToArgs(*this, cat);