From c9a08540c3d64d1285928d1ce3d3d416a2547dd9 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Thu, 30 Aug 2018 00:59:29 +0200 Subject: [PATCH] nix doctor: add command Inspired by the homebrew command, shows a combination of debugging information and warnings with potential issues with a nix installation. --- src/nix/doctor.cc | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/nix/doctor.cc diff --git a/src/nix/doctor.cc b/src/nix/doctor.cc new file mode 100644 index 000000000..fb4fc2a6e --- /dev/null +++ b/src/nix/doctor.cc @@ -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) override + { + std::cout << "Store uri: " << store->getUri() << std::endl; + } +}; + +static RegisterCommand r1(make_ref()); +