diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2023-03-02 15:02:24 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2023-03-02 15:02:24 +0100 |
commit | b69a73a2305aaee2a4da73da601dbde3f1ddd7a6 (patch) | |
tree | 4f9b64ba19120271c2ef1e2ecc3b104beb36770a /src/nix/search.cc | |
parent | 09f5975c6a0d8706b22f15e4c5998018e56484ae (diff) |
Get rid of some unchecked calls to std::cout
Diffstat (limited to 'src/nix/search.cc')
-rw-r--r-- | src/nix/search.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nix/search.cc b/src/nix/search.cc index 4fa1e7837..2e38f7e4b 100644 --- a/src/nix/search.cc +++ b/src/nix/search.cc @@ -196,9 +196,8 @@ struct CmdSearch : InstallableCommand, MixJSON for (auto & cursor : installable->getCursors(*state)) visit(*cursor, cursor->getAttrPath(), true); - if (json) { - std::cout << jsonOut->dump() << std::endl; - } + if (json) + logger->cout("%s", *jsonOut); if (!json && !results) throw Error("no results for the given search term(s)!"); |