-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse 'pipx run' input and infer the app name like 'pipx install' #854
Comments
This doesn’t need an option at all, pipx could use the same name-inferring logic in |
pipx run
to infer a default app name when passed a complex pip_url
Hey pipx team, is this issue still active? I was trying to recreate it using something like:
and
but both commands are running normally. Am I doing something wrong with trying to check the issue? Thanks in advance. |
The above command actually works, but the following doesn't:
|
Based on the comments from @meowmeowmeowcat and others, I've confirmed that this issue seems specific to git refs.
Version-pinned refs seem to resolve the app name without issue. |
So, I've been looking into the updated info and trying to understand the whole issue and try creating a proper approach. My understanding currently for this issue is that with --spec it downloads and runs the application with no problems whatsoever but when adding --spec it will not use the same argument(from the url)t to determine the app name so we need to make it use that argument as the app name too, correct? |
We should allow users to run the app without |
PR welcome. |
How would this feature be useful?
This would make
pipx run
immensely more user friendly and easier to type without resorting to a readme or scanning the--help
for the correct run syntax.Background
Given an app called
tap-mysql
currently,pipx run tap-mysql --help
works great! It knows that the plugin's name istap-mysql
and it attempts to run a command with that same name (tap-mysql --help
in this example),Given an a more complex pip_url (like
tap-mysql==1.4
orgit+https://github.com/singer-io/tap-mysql.git
), couldpipx
doesn't use the detected package name to attempt the same. Instead, the package is installed and then the command will immediately fail.So in theory, we could put those two things together and let this work out of box?:
pipx run <any_pip_url> --help
Describe the solution you'd like
The requested feature improvement would be to use the detected package name as the app name if
--spec
is not detected and if the argument passed topipx run
was a complex pip_url, such as a git ref or a version-pinned ref.Already
pipx
does have the logic to detect package name, andpipx run
already accepts simple package names without having to separately pass the app name.Describe alternatives you've considered
The workaround is to explicitly send the executable name and pip URL separately using
pipx run --spec <pip_url> <app_name>
. However, this is not very portable and since most pipx commands do not require remembering the--spec
.Instead of running like this:
or
We would need to add
tap-mysql
at the end also.The text was updated successfully, but these errors were encountered: