aboutsummaryrefslogtreecommitdiff
path: root/src/nix/show-config.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-09-04 02:40:36 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-09-04 02:40:36 +0000
commit25f7ff16fa47a6143a129fb56c9a4ecdb2259a8d (patch)
tree03764f681fddc94e532dc7a74608f37a0a698cd2 /src/nix/show-config.cc
parente12bcabdcbddc228d7af157bb3c2090e324c59a7 (diff)
parent8a945d6ddb0676b454458e6fe0e9ea6f8b4b5659 (diff)
Merge remote-tracking branch 'upstream/master' into fix-and-ci-static-builds
Diffstat (limited to 'src/nix/show-config.cc')
-rw-r--r--src/nix/show-config.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nix/show-config.cc b/src/nix/show-config.cc
index a97dc42f9..01a49f107 100644
--- a/src/nix/show-config.cc
+++ b/src/nix/show-config.cc
@@ -2,7 +2,8 @@
#include "common-args.hh"
#include "shared.hh"
#include "store-api.hh"
-#include "json.hh"
+
+#include <nlohmann/json.hpp>
using namespace nix;
@@ -19,8 +20,7 @@ struct CmdShowConfig : Command, MixJSON
{
if (json) {
// FIXME: use appropriate JSON types (bool, ints, etc).
- JSONObject jsonObj(std::cout);
- globalConfig.toJSON(jsonObj);
+ logger->stdout_("%s", globalConfig.toJSON().dump());
} else {
std::map<std::string, Config::SettingInfo> settings;
globalConfig.getSettings(settings);