aboutsummaryrefslogtreecommitdiff
path: root/src/nix
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2018-09-02 13:14:39 +0200
committerDaiderd Jordan <daiderd@gmail.com>2018-09-02 13:41:55 +0200
commit80a4b44d3d1bd35ab13d6b534f1015d15fdb08fd (patch)
tree3af22139aa94c41c884944e2b5c4cd0f6c10cb9f /src/nix
parentbfdca55868ac1cd336c5d73ff944098ce82d023d (diff)
nix doctor: only perform path/profile checks with a daemon/local store
Not all store types LegacySSHStore support these operations and it doesn't really make sense to check those.
Diffstat (limited to 'src/nix')
-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 2a8af7780..6112b1f65 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"), ":"))