Skip to content

Commit ff82de8

Browse files
getchooxokdvium
andcommitted
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 #14085, which would break help pages by causing them to make invalid calls to the dummy store they're evaluated with Fixes: #14062 Co-authored-by: Sergei Zimmerman <[email protected]>
1 parent 89141f1 commit ff82de8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/nix/main.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ static void showHelp(std::vector<std::string> subcommand, NixArgs & toplevel)
226226

227227
auto mdName = subcommand.empty() ? "nix" : fmt("nix3-%s", concatStringsSep("-", subcommand));
228228

229-
evalSettings.restrictEval = false;
230-
evalSettings.pureEval = false;
229+
evalSettings.restrictEval = true;
230+
evalSettings.pureEval = true;
231231
EvalState state({}, openStore("dummy://"), fetchSettings, evalSettings);
232232

233233
auto vGenerateManpage = state.allocValue();

0 commit comments

Comments
 (0)