<#20842 pants `dependencies` and `dependents` goal...
# github-notifications
c
#20842 pants `dependencies` and `dependents` goals with `--format=json` don't respect `--output-file` Issue created by yjabri Describe the bug
pants dependencies --output-file=dependencies.json --format=json ...
should output dependencies to the specified file. It currently just prints to the console. Pants version v2.20 OS both Additional info Looks like
dependents
is also impacted by this bug. The fix looks simple enough. In
list_dependencies_as_json
and
list_dependents_as_json
we should replace
Copy code
console.print_stdout(output)
with
Copy code
with dependents_subsystem.line_oriented(console) as print_stdout:
        print_stdout(output)
I can put together a PR for this. pantsbuild/pants