Shay Bergmann
ba81e871b2
toJSON: report error position for fancier output
Given flake:
```nix
{ description = "nix json error provenance";
inputs = {};
outputs = { self }: {
jsonFunction = _: "function";
json = builtins.toJSON (_: "function");
};
}
```
- Before:
```console
❯ nix eval --json .#jsonFunction
error: cannot convert a function to JSON
```
- After:
```console
❯ nix eval --json .#jsonFunction
error: cannot convert a function to JSON
at /nix/store/b7imf1c2j4jnkg3ys7fsfbj02s5j0i4f-source/testflake/flake.nix:4:5:
3| outputs = { self }: {
4| jsonFunction = _: "function";
| ^
5| json = builtins.toJSON (_: "function");
```
2021-10-25 21:17:52 +00:00
..
2020-03-11 16:57:48 +01:00
2021-10-25 21:17:52 +00:00
2021-08-30 09:52:43 +02:00
2015-05-20 17:29:52 +02:00