Merge pull request #129 from nix-community/force-recurse
Add parameter to force recursion (don't honour recurseIntoAttrs)
This commit is contained in:
commit
45aeab7a47
|
@ -45,6 +45,7 @@ struct MyArgs : MixEvalArgs, MixCommonArgs {
|
|||
bool meta = false;
|
||||
bool showTrace = false;
|
||||
bool impure = false;
|
||||
bool forceRecurse = false;
|
||||
bool checkCacheStatus = false;
|
||||
size_t nrWorkers = 1;
|
||||
size_t maxMemorySize = 4096;
|
||||
|
@ -70,6 +71,11 @@ struct MyArgs : MixEvalArgs, MixCommonArgs {
|
|||
.description = "allow impure expressions",
|
||||
.handler = {&impure, true}});
|
||||
|
||||
addFlag(
|
||||
{.longName = "force-recurse",
|
||||
.description = "force recursion (don't respect recurseIntoAttrs)",
|
||||
.handler = {&forceRecurse, true}});
|
||||
|
||||
addFlag({.longName = "gc-roots-dir",
|
||||
.description = "garbage collector roots directory",
|
||||
.labels = {"path"},
|
||||
|
@ -321,6 +327,7 @@ static void worker(EvalState &state, Bindings &autoArgs, AutoCloseFD &to,
|
|||
} else {
|
||||
auto attrs = nlohmann::json::array();
|
||||
bool recurse =
|
||||
myArgs.forceRecurse ||
|
||||
path.size() == 0; // Dont require `recurseForDerivations
|
||||
// = true;` for top-level attrset
|
||||
|
||||
|
|
Loading…
Reference in a new issue