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.
This commit is contained in:
Daiderd Jordan 2018-09-02 13:14:39 +02:00
parent bfdca55868
commit 80a4b44d3d
No known key found for this signature in database
GPG key ID: D02435D05B810C96

View file

@ -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"), ":"))