about summary refs log tree commit diff
path: root/src/nix/why-depends.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-09-25T14·59+0200
committerEelco Dolstra <edolstra@gmail.com>2017-09-25T14·59+0200
commitd1c6e0fe8c98106b85b4bbd5c7a775ff1972d2ff (patch)
treea494dd718b89e8afdce335614ba0ee5c5d70ed41 /src/nix/why-depends.cc
parente8d6ee7c1b90a2fe6d824f1a875acc56799ae6e2 (diff)
nix why-depends: Write to stdout
Diffstat (limited to 'src/nix/why-depends.cc')
-rw-r--r--src/nix/why-depends.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nix/why-depends.cc b/src/nix/why-depends.cc
index a90d07ed26ee..17e0595ae887 100644
--- a/src/nix/why-depends.cc
+++ b/src/nix/why-depends.cc
@@ -156,7 +156,7 @@ struct CmdWhyDepends : SourceExprCommand
 
         printNode = [&](Node & node, const string & firstPad, const string & tailPad) {
             assert(node.dist != inf);
-            std::cerr << fmt("%s%s%s%s" ANSI_NORMAL "\n",
+            std::cout << fmt("%s%s%s%s" ANSI_NORMAL "\n",
                 firstPad,
                 node.visited ? "\e[38;5;244m" : "",
                 firstPad != "" ? "=> " : "",
@@ -209,7 +209,7 @@ struct CmdWhyDepends : SourceExprCommand
                     for (auto & hash : hashes) {
                         auto pos = contents.find(hash);
                         if (pos != std::string::npos) {
-                            size_t margin = 16;
+                            size_t margin = 32;
                             auto pos2 = pos >= margin ? pos - margin : 0;
                             hits[hash].emplace_back(fmt("%s: …%s…\n",
                                     p2,
@@ -244,7 +244,7 @@ struct CmdWhyDepends : SourceExprCommand
 
                 for (auto & hit : hits[hash]) {
                     bool first = hit == *hits[hash].begin();
-                    std::cerr << tailPad
+                    std::cout << tailPad
                               << (first ? (last ? treeLast : treeConn) : (last ? treeNull : treeLine))
                               << hit;
                     if (!all) break;