From c8155e9f5fba14c4edc8c5763fb7d7e9d4d123a9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 14 Nov 2017 14:27:01 +0100 Subject: Don't indent JSON output --- src/nix/ls.cc | 2 +- src/nix/path-info.cc | 2 +- src/nix/search.cc | 2 +- src/nix/show-config.cc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nix') diff --git a/src/nix/ls.cc b/src/nix/ls.cc index 8566b8b0682c..5408c092992e 100644 --- a/src/nix/ls.cc +++ b/src/nix/ls.cc @@ -76,7 +76,7 @@ struct MixLs : virtual Args, MixJSON if (path == "/") path = ""; if (json) { - JSONPlaceholder jsonRoot(std::cout, true); + JSONPlaceholder jsonRoot(std::cout); listNar(jsonRoot, accessor, path); } else listText(accessor); diff --git a/src/nix/path-info.cc b/src/nix/path-info.cc index ca02a4c929be..47caa401d3c9 100644 --- a/src/nix/path-info.cc +++ b/src/nix/path-info.cc @@ -65,7 +65,7 @@ struct CmdPathInfo : StorePathsCommand, MixJSON pathLen = std::max(pathLen, storePath.size()); if (json) { - JSONPlaceholder jsonRoot(std::cout, true); + JSONPlaceholder jsonRoot(std::cout); store->pathInfoToJSON(jsonRoot, // FIXME: preserve order? PathSet(storePaths.begin(), storePaths.end()), diff --git a/src/nix/search.cc b/src/nix/search.cc index f458367dcb55..a9dc2d6b924b 100644 --- a/src/nix/search.cc +++ b/src/nix/search.cc @@ -84,7 +84,7 @@ struct CmdSearch : SourceExprCommand, MixJSON bool first = true; - auto jsonOut = json ? std::make_unique(std::cout, true) : nullptr; + auto jsonOut = json ? std::make_unique(std::cout) : nullptr; auto sToplevel = state->symbols.create("_toplevel"); auto sRecurse = state->symbols.create("recurseForDerivations"); diff --git a/src/nix/show-config.cc b/src/nix/show-config.cc index c628c2898d73..c64b12c8dd62 100644 --- a/src/nix/show-config.cc +++ b/src/nix/show-config.cc @@ -26,7 +26,7 @@ struct CmdShowConfig : Command, MixJSON { if (json) { // FIXME: use appropriate JSON types (bool, ints, etc). - JSONObject jsonObj(std::cout, true); + JSONObject jsonObj(std::cout); settings.toJSON(jsonObj); } else { for (auto & s : settings.getSettings()) -- cgit 1.4.1