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:
parent
7fa338f4ba
commit
f92c9a0ac5
7 changed files with 51 additions and 5 deletions
|
@ -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()));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue