aboutsummaryrefslogtreecommitdiff
path: root/src/nix/store-repair.cc
blob: 1c7a4392ea7458fc58fdc45faac2dd20343204ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#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"});