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

* Allow unprivileged users to do `nix-store --clear-failed-paths' and

`nix-store --query-failed-paths'.
This commit is contained in:
Eelco Dolstra 2010-05-04 10:45:10 +00:00
parent 7fa338f4ba
commit f92c9a0ac5
7 changed files with 51 additions and 5 deletions

View file

@ -670,7 +670,7 @@ static void opQueryFailedPaths(Strings opFlags, Strings opArgs)
{
if (!opArgs.empty() || !opFlags.empty())
throw UsageError("no arguments expected");
PathSet failed = ensureLocalStore().queryFailedPaths();
PathSet failed = store->queryFailedPaths();
foreach (PathSet::iterator, i, failed)
cout << format("%1%\n") % *i;
}
@ -680,7 +680,7 @@ static void opClearFailedPaths(Strings opFlags, Strings opArgs)
{
if (!opFlags.empty())
throw UsageError("no flags expected");
ensureLocalStore().clearFailedPaths(PathSet(opArgs.begin(), opArgs.end()));
store->clearFailedPaths(PathSet(opArgs.begin(), opArgs.end()));
}