aboutsummaryrefslogtreecommitdiff
path: root/src/nix-instantiate
diff options
context:
space:
mode:
authorKevin Amado <kamadorueda@gmail.com>2021-11-13 20:29:31 -0500
committerKevin Amado <kamadorueda@gmail.com>2021-11-13 20:33:34 -0500
commitd0e9e184895b62d193a6eff5e332a338d3664e5b (patch)
treea4f3a9afadd11b15d68e660ac217f83e773c943d /src/nix-instantiate
parentbceda304982a34c65d5a1dab449cb5bc59f63b83 (diff)
toXML: display errors position
- This change applies to builtins.toXML and inner workings - Proof of concept: ```nix let e = builtins.toXML e; in e ``` - Before: ``` $ nix-instantiate --eval poc.nix error: infinite recursion encountered ``` - After: ``` $ nix-instantiate --eval poc.nix error: infinite recursion encountered at /data/github/kamadorueda/nix/poc.nix:1:9: 1| let e = builtins.toXML e; in e | ```
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 25d0fa3ba..6ff3d2f19 100644
--- a/src/nix-instantiate/nix-instantiate.cc
+++ b/src/nix-instantiate/nix-instantiate.cc
@@ -50,7 +50,7 @@ void processExpr(EvalState & state, const Strings & attrPaths,
else
state.autoCallFunction(autoArgs, v, vRes);
if (output == okXML)
- printValueAsXML(state, strict, location, vRes, std::cout, context);
+ printValueAsXML(state, strict, location, vRes, std::cout, context, noPos);
else if (output == okJSON)
printValueAsJSON(state, strict, vRes, std::cout, context);
else {