diff options
author | Naïm Favier <n@monade.li> | 2022-08-16 12:23:37 +0200 |
---|---|---|
committer | Naïm Favier <n@monade.li> | 2022-08-22 15:01:35 +0200 |
commit | 062e4fcdde145ec6780df8d1002dc7380f6eb4bf (patch) | |
tree | c644db3d62e3f1fd1f36fd47369336018fa26054 /src/nix/eval.cc | |
parent | af4e8b00fb986acf32d7e4cd4fff7218b38958df (diff) |
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
Diffstat (limited to 'src/nix/eval.cc')
-rw-r--r-- | src/nix/eval.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix/eval.cc b/src/nix/eval.cc index 967dc8519..cc022ae43 100644 --- a/src/nix/eval.cc +++ b/src/nix/eval.cc @@ -116,7 +116,7 @@ struct CmdEval : MixJSON, InstallableCommand else if (json) { JSONPlaceholder jsonOut(std::cout); - printValueAsJSON(*state, true, *v, pos, jsonOut, context); + printValueAsJSON(*state, true, *v, pos, jsonOut, context, false); } else { |