diff options
author | Naïm Favier <n@monade.li> | 2022-08-22 15:07:52 +0200 |
---|---|---|
committer | Naïm Favier <n@monade.li> | 2022-08-22 15:07:52 +0200 |
commit | 4c2ff4a0f4c2106d5792a87a1ba9ee1fd18c0e4b (patch) | |
tree | 7ae20096a5c0c0dcaf3a219966e30571ec268847 /src/nix-instantiate | |
parent | 062e4fcdde145ec6780df8d1002dc7380f6eb4bf (diff) |
JSON: add missing newlines
after `nix eval --json` and `nix-instantiate --eval --json`.
Diffstat (limited to 'src/nix-instantiate')
-rw-r--r-- | src/nix-instantiate/nix-instantiate.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nix-instantiate/nix-instantiate.cc b/src/nix-instantiate/nix-instantiate.cc index 6181d2190..80f35828c 100644 --- a/src/nix-instantiate/nix-instantiate.cc +++ b/src/nix-instantiate/nix-instantiate.cc @@ -52,9 +52,10 @@ void processExpr(EvalState & state, const Strings & attrPaths, state.autoCallFunction(autoArgs, v, vRes); if (output == okXML) printValueAsXML(state, strict, location, vRes, std::cout, context, noPos); - else if (output == okJSON) + else if (output == okJSON) { printValueAsJSON(state, strict, vRes, v.determinePos(noPos), std::cout, context, false); - else { + std::cout << std::endl; + } else { if (strict) state.forceValueDeep(vRes); vRes.print(state.symbols, std::cout); std::cout << std::endl; |