mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 06:26:15 +02:00
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:
parent
475a0a54a9
commit
c9a08540c3
1 changed files with 26 additions and 0 deletions
26
src/nix/doctor.cc
Normal file
26
src/nix/doctor.cc
Normal 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>());
|
||||||
|
|
Loading…
Reference in a new issue