1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 14:21:48 +02:00
This commit is contained in:
Shahar "Dawn" Or 2025-06-23 10:10:54 -07:00 committed by GitHub
commit a2784e510f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 93 additions and 20 deletions

View file

@ -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»"}
```