mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 20:16:03 +01:00
JSON: print paths as strings without copying them to the store
Makes `printValueAsJSON` not copy paths to the store for `nix eval --json`, `nix-instantiate --eval --json` and `nix-env --json`. Fixes https://github.com/NixOS/nix/issues/5612
This commit is contained in:
parent
af4e8b00fb
commit
062e4fcdde
6 changed files with 18 additions and 15 deletions
|
|
@ -99,7 +99,7 @@ class ExternalValueBase
|
|||
|
||||
/* Print the value as JSON. Defaults to unconvertable, i.e. throws an error */
|
||||
virtual void printValueAsJSON(EvalState & state, bool strict,
|
||||
JSONPlaceholder & out, PathSet & context) const;
|
||||
JSONPlaceholder & out, PathSet & context, bool copyToStore = true) const;
|
||||
|
||||
/* Print the value as XML. Defaults to unevaluated */
|
||||
virtual void printValueAsXML(EvalState & state, bool strict, bool location,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue