You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In commands.py, in function run(): run() calls _download_and_run() with the variable package_or_url where _download_and_run() is expecting argument package.
The result is that if the if branch executes for this statement in _download_and_run():
if not (venv.bin_path / app).exists():
_download_and_run() will try and execute venv.get_venv_metadata_for_package(package).
If the package argument to _download_and_run() is in fact a url (as it could be if run() is called with a --spec argument) then venv.get_venv_metadata_for_package(package) will fail because it is expecting a package name and not a url.
How to reproduce
One would need to call pipx run with a --spec argument with a url and a non-existent app. For example by modifying an example from the pipx makefile: pipx run --spec=git+https://github.com/cs01/nox.git@5ea70723e9e6 notnox
Unexpected behavior
Because notnox is not an app in the package, the error if statement will execute. However venv_metadata_inspector.py will find no package named git+https://github.com/cs01/nox.git@5ea70723e9e6 and so will return empty information about the venv. Thus the printed error message has no apps to show as available or associated with the package in the venv.
The text was updated successfully, but these errors were encountered:
Describe the bug
In
commands.py
, in functionrun()
:run()
calls_download_and_run()
with the variablepackage_or_url
where_download_and_run()
is expecting argumentpackage
.The result is that if the if branch executes for this statement in
_download_and_run()
:_download_and_run()
will try and executevenv.get_venv_metadata_for_package(package)
.If the package argument to
_download_and_run()
is in fact a url (as it could be ifrun()
is called with a --spec argument) thenvenv.get_venv_metadata_for_package(package)
will fail because it is expecting a package name and not a url.How to reproduce
One would need to call
pipx run
with a--spec
argument with a url and a non-existent app. For example by modifying an example from the pipx makefile:pipx run --spec=git+https://github.com/cs01/nox.git@5ea70723e9e6 notnox
Unexpected behavior
Because notnox is not an app in the package, the error if statement will execute. However
venv_metadata_inspector.py
will find no package namedgit+https://github.com/cs01/nox.git@5ea70723e9e6
and so will return empty information about the venv. Thus the printed error message has no apps to show as available or associated with the package in the venv.The text was updated successfully, but these errors were encountered: