mirror of
https://github.com/NixOS/nix
synced 2025-07-07 14:21:48 +02:00
Merge 88705f848b
into f9afc1e68c
This commit is contained in:
commit
a2784e510f
14 changed files with 93 additions and 20 deletions
|
@ -112,6 +112,11 @@ standard input.
|
|||
When used with `--eval`, print the resulting value as an JSON
|
||||
representation of the abstract syntax tree rather than as a Nix expression.
|
||||
|
||||
- `--replace-eval-errors`
|
||||
|
||||
When used with `--eval` and `--json`, replace any evaluation errors with the string
|
||||
`"«evaluation error»"`.
|
||||
|
||||
- `--xml`
|
||||
|
||||
When used with `--eval`, print the resulting value as an XML
|
||||
|
@ -205,3 +210,10 @@ $ nix-instantiate --eval --xml --strict --expr '{ x = {}; }'
|
|||
</attrs>
|
||||
</expr>
|
||||
```
|
||||
|
||||
Replacing evaluation errors:
|
||||
|
||||
```console
|
||||
$ nix-instantiate --eval --json --replace-eval-errors --expr '{ a = throw "fail"; }'
|
||||
{"a":"«evaluation error»"}
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue