about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/nix/doctor.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/nix/doctor.cc b/src/nix/doctor.cc
index 2a8af7780b9b..6112b1f650a0 100644
--- a/src/nix/doctor.cc
+++ b/src/nix/doctor.cc
@@ -33,8 +33,12 @@ struct CmdDoctor : StoreCommand
         std::cout << "Store uri: " << store->getUri() << std::endl;
         std::cout << std::endl;
 
-        checkNixInPath();
-        checkProfileRoots(store);
+        auto type = getStoreType();
+
+        if (type < tOther) {
+            checkNixInPath();
+            checkProfileRoots(store);
+        }
         checkStoreProtocol(store->getProtocol());
     }
 
@@ -56,7 +60,6 @@ struct CmdDoctor : StoreCommand
 
     void checkProfileRoots(ref<Store> store) {
         PathSet dirs;
-
         Roots roots = store->findRoots();
 
         for (auto & dir : tokenizeString<Strings>(getEnv("PATH"), ":"))