pypa / pipx

Install and Run Python Applications in Isolated Environments
https://pipx.pypa.io
MIT License
9.51k stars 396 forks source link

cli parameter parsing is corrupted by strict positional #1444

Open xiaoyao9184 opened 1 month ago

xiaoyao9184 commented 1 month ago

In version 1.6.0, the following command cannot be used

Describe the bug

In version 1.6.0, the following command cannot be used.

pipx inject ansible-core --force ansible
error: unrecognized arguments: ansible

While adjusting the order can work

pipx inject ansible-core ansible --force

But this will create compatibility issues, the current way used in devcontainers is

features/src/pipx-package/install.sh at 9a1d24b27b2d1ea8916ebe49c9ce674375dced27 · devcontainers-contrib/features

[Bug]: Failed to build ansible feature · Issue #607 · devcontainers-contrib/features (github.com)

This is related to HIGH: pipx install --global order broken in 1.6.0 · Issue #1443 · pypa/pipx

dukecat0 commented 1 month ago

Probably it's because of the change of this line: https://github.com/pypa/pipx/pull/1252/files#diff-be12955f38ede5e93b9a5868a5c13533b561c74acc9686d2e886cc9428148e32R519

huxuan commented 1 month ago

Probably it's because of the change of this line: https://github.com/pypa/pipx/pull/1252/files#diff-be12955f38ede5e93b9a5868a5c13533b561c74acc9686d2e886cc9428148e32R519

Seems there is no easy solution for back-compatibility while keeping the --requirement feature. :-(