Skip to content

Commit d308b42

Browse files
committed
cli: remove duplicate packages from --support print out
1 parent 6f88c66 commit d308b42

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pyinfra_cli/prints.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,12 @@ def print_support_info() -> None:
149149
click.echo(" Machine: {0}".format(platform.uname()[4]), err=True)
150150
click.echo(" pyinfra: v{0}".format(__version__), err=True)
151151

152+
seen_reqs: set[str] = set()
152153
for requirement_string in sorted(requires("pyinfra") or []):
153154
requirement = Requirement(requirement_string)
155+
if requirement.name in seen_reqs:
156+
continue
157+
seen_reqs.add(requirement.name)
154158
try:
155159
click.echo(
156160
" {0}: v{1}".format(requirement.name, version(requirement.name)),

0 commit comments

Comments
 (0)