mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-27 16:16:16 +02:00
27 lines
562 B
C++
27 lines
562 B
C++
#include "command.hh"
|
|
#include "store-api.hh"
|
|
|
|
using namespace nix;
|
|
|
|
struct CmdStoreRepair : StorePathsCommand
|
|
{
|
|
std::string description() override
|
|
{
|
|
return "repair store paths";
|
|
}
|
|
|
|
std::string doc() override
|
|
{
|
|
return
|
|
#include "store-repair.md"
|
|
;
|
|
}
|
|
|
|
void run(ref<Store> store, std::vector<StorePath> && storePaths) override
|
|
{
|
|
for (auto & path : storePaths)
|
|
store->repairPath(path);
|
|
}
|
|
};
|
|
|
|
static auto rStoreRepair = registerCommand2<CmdStoreRepair>({"store", "repair"});
|