aboutsummaryrefslogtreecommitdiff
path: root/src/nix/eval.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/eval.cc')
-rw-r--r--src/nix/eval.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nix/eval.cc b/src/nix/eval.cc
index 65d61e005..8cd04d5fe 100644
--- a/src/nix/eval.cc
+++ b/src/nix/eval.cc
@@ -81,7 +81,7 @@ struct CmdEval : MixJSON, InstallableCommand
recurse = [&](Value & v, const Pos & pos, const Path & path)
{
- state->forceValue(v);
+ state->forceValue(v, pos);
if (v.type() == nString)
// FIXME: disallow strings with contexts?
writeFile(path, v.string.s);
@@ -107,12 +107,12 @@ struct CmdEval : MixJSON, InstallableCommand
else if (raw) {
stopProgressBar();
- std::cout << state->coerceToString(noPos, *v, context);
+ std::cout << *state->coerceToString(noPos, *v, context);
}
else if (json) {
JSONPlaceholder jsonOut(std::cout);
- printValueAsJSON(*state, true, *v, jsonOut, context);
+ printValueAsJSON(*state, true, *v, pos, jsonOut, context);
}
else {