1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-04 07:11:47 +02:00

* Subflag in --verify': nix-store --verify --check-contents' checks

that the contents of store paths has not changed by comparing hashes
  of their current contents to the hashes stored in the database.
This commit is contained in:
Eelco Dolstra 2005-02-08 13:48:53 +00:00
parent 3d74274b37
commit c547439843
3 changed files with 47 additions and 11 deletions

View file

@ -420,7 +420,17 @@ static void opInit(Strings opFlags, Strings opArgs)
/* Verify the consistency of the Nix environment. */
static void opVerify(Strings opFlags, Strings opArgs)
{
verifyStore();
if (!opArgs.empty())
throw UsageError("no arguments expected");
bool checkContents = false;
for (Strings::iterator i = opFlags.begin();
i != opFlags.end(); ++i)
if (*i == "--check-contents") checkContents = true;
else throw UsageError(format("unknown flag `%1%'") % *i);
verifyStore(checkContents);
}