Skip to content

Commit

Permalink
Fix show --tre
Browse files Browse the repository at this point in the history
  • Loading branch information
sdispater committed Mar 5, 2018
1 parent 27ce5b4 commit 972cd7d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions poetry/console/commands/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,14 @@ def _display_tree(self,
break

dependencies = sorted(dependencies, key=lambda x: x.name)
tree_bar = previous_tree_bar + ' ├'
tree_bar = previous_tree_bar + ' ├'
i = 0
total = len(dependencies)
for dependency in dependencies:
i += 1
current_tree = packages_in_tree
if i == total:
tree_bar = previous_tree_bar + '└'
tree_bar = previous_tree_bar + ' └'

color_ident = level % len(self.colors)
color = self.colors[color_ident]
Expand All @@ -196,7 +196,7 @@ def _display_tree(self,
if dependency.name in current_tree:
circular_warn = '(circular dependency aborted here)'

info = f'{tree_bar}── <{color}>{dependency.name}</{color} ' \
info = f'{tree_bar}── <{color}>{dependency.name}</{color}> ' \
f'{dependency.pretty_constraint} {circular_warn}'
self._write_tree_line(info)

Expand Down

0 comments on commit 972cd7d

Please sign in to comment.