about summary refs log tree commit diff
path: root/src/libstore/globals.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-11-09T13·58+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-11-09T13·58+0100
commitf581ce0b0cb86670db2b806f98ac0ec368b8cdc1 (patch)
tree631afca691d8f45a45f6db6bbac72d8e0e4da8ee /src/libstore/globals.cc
parent91ef4d9a81827177963bcf7708af3a46217fd0e9 (diff)
Don't start copy-from-other-stores if $NIX_OTHER_STORES is unset
Slight optimisation.
Diffstat (limited to 'src/libstore/globals.cc')
-rw-r--r--src/libstore/globals.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc
index 9b22d54508c1..7b881d1d2ff8 100644
--- a/src/libstore/globals.cc
+++ b/src/libstore/globals.cc
@@ -61,7 +61,8 @@ void Settings::processEnvironment()
 
     string subs = getEnv("NIX_SUBSTITUTERS", "default");
     if (subs == "default") {
-        substituters.push_back(nixLibexecDir + "/nix/substituters/copy-from-other-stores.pl");
+        if (getEnv("NIX_OTHER_STORES") != "")
+            substituters.push_back(nixLibexecDir + "/nix/substituters/copy-from-other-stores.pl");
         substituters.push_back(nixLibexecDir + "/nix/substituters/download-using-manifests.pl");
         substituters.push_back(nixLibexecDir + "/nix/substituters/download-from-binary-cache.pl");
     } else