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-09-02 12:54:20 +02:00
parent 475a0a54a9
commit c9a08540c3
+26
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>());