Skip to content

Commit

Permalink
Merge pull request #3 from sandydoo/track-get-env
Browse files Browse the repository at this point in the history
getEnv: log with debug which env is being read
  • Loading branch information
domenkozar authored Dec 13, 2024
2 parents f6c5ae4 + 000a5b7 commit bde6a1a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libexpr/primops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,7 @@ static RegisterPrimOp primop_tryEval({
static void prim_getEnv(EvalState & state, const PosIdx pos, Value * * args, Value & v)
{
std::string name(state.forceStringNoCtx(*args[0], pos, "while evaluating the first argument passed to builtins.getEnv"));
printTalkative("devenv getEnv: '%1%'", name);
v.mkString(state.settings.restrictEval || state.settings.pureEval ? "" : getEnv(name).value_or(""));
}

Expand Down

0 comments on commit bde6a1a

Please sign in to comment.