lix/src/nix/store-repair.cc

28 lines
562 B
C++
Raw Normal View History

2021-01-13 22:27:39 +00:00
#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"
;
}
2021-09-27 08:53:09 +00:00
void run(ref<Store> store, std::vector<StorePath> && storePaths) override
2021-01-13 22:27:39 +00:00
{
for (auto & path : storePaths)
store->repairPath(path);
}
};
static auto rStoreRepair = registerCommand2<CmdStoreRepair>({"store", "repair"});