aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShay Bergmann <shaybergmann@gmail.com>2021-10-27 19:01:32 +0000
committerShay Bergmann <shaybergmann@gmail.com>2021-10-27 19:01:32 +0000
commit465a167c4347cd208f39670bad349fc61bb42d3d (patch)
tree169283eb6f1db8cd2fa7979e0ac249e89df1822c /src
parent769de259f0060d55ec8317c109cf12aa4003f7fe (diff)
nix-instantiate: pass pos in the `--eval --json` code path
Diffstat (limited to 'src')
-rw-r--r--src/nix-instantiate/nix-instantiate.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-instantiate/nix-instantiate.cc b/src/nix-instantiate/nix-instantiate.cc
index ac48682c7..fbc697864 100644
--- a/src/nix-instantiate/nix-instantiate.cc
+++ b/src/nix-instantiate/nix-instantiate.cc
@@ -52,7 +52,7 @@ void processExpr(EvalState & state, const Strings & attrPaths,
if (output == okXML)
printValueAsXML(state, strict, location, vRes, std::cout, context);
else if (output == okJSON)
- printValueAsJSON(state, strict, vRes, noPos, std::cout, context);
+ printValueAsJSON(state, strict, vRes, v.determinePos(noPos), std::cout, context);
else {
if (strict) state.forceValueDeep(vRes);
std::cout << vRes << std::endl;