Skip to content

Commit

Permalink
Discard duplicated package specifications
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmyatt authored Feb 15, 2024
1 parent 8ea479b commit 40e6502
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pipx/commands/inject.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ def inject(
suffix: bool = False,
) -> ExitCode:
"""Returns pipx exit code."""
# Combined list of packages
packages = list(package_specs)
# Combined collection of package specifications
packages = set(package_specs)
for filename in requirement_files:
packages.extend(parse_requirements(filename))
packages.update(parse_requirements(filename))

if not packages:
raise PipxError("No packages have been specified.")
Expand Down

0 comments on commit 40e6502

Please sign in to comment.