pypa / pipx

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

`sudo pipx ensurepath --global` fails on MacOS due to --global flag order #1429

Closed openrory closed 4 months ago

openrory commented 4 months ago

Describe the bug

When running sudo pipx ensurepath --global as part of the installation process for MacOS, it gives the following error:

usage: pipx [-h] [--quiet] [--verbose] [--global] [--version]
            {install,uninject,inject,upgrade,upgrade-all,uninstall,uninstall-all,reinstall,reinstall-all,list,interpreter,run,runpip,ensurepath,environment,completions}
            ...
pipx: error: unrecognized arguments: --global

How to reproduce

run sudo pipx ensurepath --global

Expected behavior

/usr/local/bin is already in PATH.

⚠️  All pipx binary directories have been added to PATH. If you are sure you want to proceed, try again with the '--force'
flag.
Gitznik commented 4 months ago

The fix for this has already been implemented in https://github.com/pypa/pipx/pull/1397, and will be in the next release.

dukecat0 commented 4 months ago

Probably it's time to create a new release?

Gitznik commented 4 months ago

Probably it's time to create a new release?

Whoever does this must fix the news fragments though. Multiple lines are not supported and break the formatting (see the current latest changelog). I can do it in the evening (CEST).

openrory commented 4 months ago

Even better. I see you’ve already closed the issue, thanks! Looking forward to the new release ;-)On 28 May 2024, at 16:03, Robert @.***> wrote: The fix for this has already been implemented in #1397, and will be in the next release.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>