mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 16:26:18 +02:00
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
This commit is contained in:
parent
8a446aff75
commit
81cd0a113b
1 changed files with 1 additions and 1 deletions
|
@ -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 & ) { }
|
||||
|
|
Loading…
Reference in a new issue