diff options
author | regnat <rg@regnat.ovh> | 2022-01-14 13:41:45 +0100 |
---|---|---|
committer | regnat <rg@regnat.ovh> | 2022-01-14 13:41:45 +0100 |
commit | 81cd0a113b8da1485c2f892c9dd9edb541f139ad (patch) | |
tree | 92b3894366772918254e27d26e0eaa3a5a1d480d /src/nix/why-depends.cc | |
parent | 8a446aff75880f11db248677a25426f93a0687f3 (diff) |
Start the pager early-enough in `nix why-depends`
`nix why-depends` is piping its output into a pager by default.
However the pager was only started after the first path is printed,
causing it to be excluded from the pager output.
(Actually the pager was started *inside* the recursive function that was
printing the dependency chain, so a new instance was started at each
level. It’s a little miracle that it worked at all).
Fix #5911
Diffstat (limited to 'src/nix/why-depends.cc')
-rw-r--r-- | src/nix/why-depends.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix/why-depends.cc b/src/nix/why-depends.cc index e27f56ef5..dd43bd1c3 100644 --- a/src/nix/why-depends.cc +++ b/src/nix/why-depends.cc @@ -239,7 +239,6 @@ struct CmdWhyDepends : SourceExprCommand visitPath(pathS); - RunPager pager; for (auto & ref : refs) { std::string hash(ref.second->path.hashPart()); @@ -259,6 +258,7 @@ struct CmdWhyDepends : SourceExprCommand } }; + RunPager pager; try { printNode(graph.at(packagePath), "", ""); } catch (BailOut & ) { } |