nix doctor: add command

Inspired by the homebrew command, shows a combination of debugging
information and warnings with potential issues with a nix installation.
This commit is contained in:
Daiderd Jordan 2018-08-30 00:59:29 +02:00
parent 475a0a54a9
commit c9a08540c3
No known key found for this signature in database
GPG key ID: D02435D05B810C96

26
src/nix/doctor.cc Normal file
View file

@ -0,0 +1,26 @@
#include "command.hh"
#include "shared.hh"
#include "store-api.hh"
using namespace nix;
struct CmdDoctor : StoreCommand
{
std::string name() override
{
return "doctor";
}
std::string description() override
{
return "check your system for potential problems";
}
void run(ref<Store> store) override
{
std::cout << "Store uri: " << store->getUri() << std::endl;
}
};
static RegisterCommand r1(make_ref<CmdDoctor>());