aboutsummaryrefslogtreecommitdiff
path: root/src/nix-instantiate
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2021-11-15 07:57:46 -0600
committerGitHub <noreply@github.com>2021-11-15 07:57:46 -0600
commit164179983ef97dc51f2685e4f844a54e3fef4c84 (patch)
tree7ff46e344ba67db78b54ceaeefc390dca6d28b46 /src/nix-instantiate
parented33033926ebc7c28f3cbbfaa06a430a678f555f (diff)
parenta50c027ece2dc853109c7d2c2f10dd6581e2554d (diff)
Merge pull request #5428 from kreisys/add-pos-to-json-type-error
toJSON: report error position for fancier output
Diffstat (limited to 'src/nix-instantiate')
-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 6ff3d2f19..19a954ddd 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, noPos);
else if (output == okJSON)
- printValueAsJSON(state, strict, vRes, std::cout, context);
+ printValueAsJSON(state, strict, vRes, v.determinePos(noPos), std::cout, context);
else {
if (strict) state.forceValueDeep(vRes);
std::cout << vRes << std::endl;