about summary refs log tree commit diff
path: root/src/libstore/local-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r--src/libstore/local-store.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index e1ff94d2ce75..1ffacc5b035e 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -780,6 +780,7 @@ Path LocalStore::queryPathFromHashPart(const string & hashPart)
 
 PathSet LocalStore::querySubstitutablePaths(const PathSet & paths)
 {
+    if (!settings.useSubstitutes) return PathSet();
     PathSet res;
     for (auto & sub : getDefaultSubstituters()) {
         if (sub->storeDir != storeDir) continue;
@@ -799,6 +800,7 @@ PathSet LocalStore::querySubstitutablePaths(const PathSet & paths)
 void LocalStore::querySubstitutablePathInfos(const PathSet & paths,
     SubstitutablePathInfos & infos)
 {
+    if (!settings.useSubstitutes) return;
     for (auto & sub : getDefaultSubstituters()) {
         if (sub->storeDir != storeDir) continue;
         for (auto & path : paths) {