mirror of
https://github.com/NixOS/nix.git
synced 2025-12-03 07:31:00 +01:00
nix-cli: use pure/restricted eval for help pages
This avoids any complications that can arise from the environment affecting evaluation of the help pages (which don't need to be calling out to anything external anyways) A recent example of one of these problems is https://github.com/NixOS/nix/issues/14085, which would break help pages by causing them to make invalid calls to the dummy store they're evaluated with Fixes: https://github.com/NixOS/nix/issues/14062 Co-authored-by: Sergei Zimmerman <sergei@zimmerman.foo>
This commit is contained in:
parent
89141f1d67
commit
ff82de86da
1 changed files with 2 additions and 2 deletions
|
|
@ -226,8 +226,8 @@ static void showHelp(std::vector<std::string> subcommand, NixArgs & toplevel)
|
|||
|
||||
auto mdName = subcommand.empty() ? "nix" : fmt("nix3-%s", concatStringsSep("-", subcommand));
|
||||
|
||||
evalSettings.restrictEval = false;
|
||||
evalSettings.pureEval = false;
|
||||
evalSettings.restrictEval = true;
|
||||
evalSettings.pureEval = true;
|
||||
EvalState state({}, openStore("dummy://"), fetchSettings, evalSettings);
|
||||
|
||||
auto vGenerateManpage = state.allocValue();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue