improved graph output

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
2017-09-12 11:34:11 -04:00
parent db1249fbb4
commit c8c966f730
+13 -2
View File
@@ -1393,8 +1393,19 @@ def graph():
# Run dep-tree.
c = delegator.run(cmd)
# Echo its output.
click.echo(c.out)
for line in c.out.split('\n'):
# Ignore bad packages.
if line.split('==')[0] in BAD_PACKAGES:
break
# Bold top-level packages.
if not line.startswith(' '):
click.echo(crayons.white(line, bold=True))
# Echo the rest.
else:
click.echo(crayons.white(line, bold=False))
# Return its return code.
sys.exit(c.return_code)