diff options
Diffstat (limited to 'src/nix')
-rw-r--r-- | src/nix/doctor.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nix/doctor.cc b/src/nix/doctor.cc index 531f0ad86..da7a1d7a0 100644 --- a/src/nix/doctor.cc +++ b/src/nix/doctor.cc @@ -146,10 +146,9 @@ struct CmdDoctor : StoreCommand void checkTrustedUser(ref<Store> store) { - std::string_view trusted = store->isTrustedClient() - ? "trusted" - : "not trusted"; - checkInfo(fmt("You are %s by store uri: %s", trusted, store->getUri())); + auto trustedMay = store->isTrustedClient(); + std::string_view trustedness = trustedMay ? (*trustedMay ? "trusted" : "not trusted") : "unknown trust"; + checkInfo(fmt("You are %s by store uri: %s", trustedness, store->getUri())); } }; |