diff options
author | Naïm Favier <n@monade.li> | 2023-01-25 15:10:35 +0100 |
---|---|---|
committer | Naïm Favier <n@monade.li> | 2023-01-27 13:28:57 +0100 |
commit | 1cba5984a68a489c4a56691032e4c87991c678f4 (patch) | |
tree | 290590cf14d53a9d1382cd8741b4332543e15af5 /src/libexpr/eval.hh | |
parent | f233fd496db07212125696613ac085506e2be805 (diff) |
getDefaultNixPath: actually respect `{restrict,pure}-eval`
Previously, getDefaultNixPath was called too early: at initialisation
time, before CLI and config have been processed, when `restrictEval` and
`pureEval` both have their default value `false`. Call it when
initialising the EvalState instead, and use `setDefault`.
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r-- | src/libexpr/eval.hh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh index e4d5906bd..876a6ae0e 100644 --- a/src/libexpr/eval.hh +++ b/src/libexpr/eval.hh @@ -570,7 +570,7 @@ struct EvalSettings : Config { EvalSettings(); - static Strings getDefaultNixPath(); + Strings getDefaultNixPath(); static bool isPseudoUrl(std::string_view s); @@ -580,7 +580,7 @@ struct EvalSettings : Config "Whether builtin functions that allow executing native code should be enabled."}; Setting<Strings> nixPath{ - this, getDefaultNixPath(), "nix-path", + this, {}, "nix-path", "List of directories to be searched for `<...>` file references."}; Setting<bool> restrictEval{ |