aboutsummaryrefslogtreecommitdiff
path: root/src/nix/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/main.cc')
-rw-r--r--src/nix/main.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nix/main.cc b/src/nix/main.cc
index d3d2f5b16..53bf649d4 100644
--- a/src/nix/main.cc
+++ b/src/nix/main.cc
@@ -292,7 +292,7 @@ void mainWrapped(int argc, char * * argv)
NixArgs args;
if (argc == 2 && std::string(argv[1]) == "__dump-args") {
- std::cout << args.toJSON().dump() << "\n";
+ logger->cout("%s", args.toJSON());
return;
}
@@ -312,7 +312,7 @@ void mainWrapped(int argc, char * * argv)
b["doc"] = trim(stripIndentation(primOp->doc));
res[state.symbols[builtin.name]] = std::move(b);
}
- std::cout << res.dump() << "\n";
+ logger->cout("%s", res);
return;
}
@@ -321,14 +321,14 @@ void mainWrapped(int argc, char * * argv)
if (completions) {
switch (completionType) {
case ctNormal:
- std::cout << "normal\n"; break;
+ logger->cout("normal"); break;
case ctFilenames:
- std::cout << "filenames\n"; break;
+ logger->cout("filenames"); break;
case ctAttrs:
- std::cout << "attrs\n"; break;
+ logger->cout("attrs"); break;
}
for (auto & s : *completions)
- std::cout << s.completion << "\t" << trim(s.description) << "\n";
+ logger->cout(s.completion + "\t" + trim(s.description));
}
});