From 80a4b44d3d1bd35ab13d6b534f1015d15fdb08fd Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sun, 2 Sep 2018 13:14:39 +0200 Subject: 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. --- src/nix/doctor.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/nix') 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) { PathSet dirs; - Roots roots = store->findRoots(); for (auto & dir : tokenizeString(getEnv("PATH"), ":")) -- cgit 1.4.1