Skip to content

inject command does not respect "--force" option #1300

@huxuan

Description

@huxuan

Describe the bug

When --force is NOT specified, the pipx inject command will still install the dependency when it exists.

How to reproduce

pipx install pycowsay
pipx inject pycowsay cowsay # inject cowsay into pycowsay for the first time
pipx inject pycowsay cowsay # inject again without `--force`, but it is still installed again

Expected behavior

Only install the injected package again when --force is specified.

BTW, I can try to submit a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions