Skip to content

pipx install --force without --python complains about the ignorance of --python #1304

@huxuan

Description

@huxuan

Describe the bug

When run pipx install --force without --python, pipx still complains about the ignorance of --python

How to reproduce

> pipx install pycowsay
> pipx install pycowsay --force
--python is ignored when --force is passed. If you want to reinstall pycowsay with <path/to/default/python>, run `pipx reinstall pycowsay
--python <path/to/default/python>` instead.

Expected behavior

No --python ignorance warning.

BTW, seems the bug is introduced by the default value of --python [1]. And there are at least two approaches to resolve it. One is to remove the default value and check whether there is any side effects. The other way is to change the condition when warning [2]. Please let me know if there is any preference.

[1]

default=DEFAULT_PYTHON,

[2]
if not reinstall and force and python_flag_was_passed:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions