Skip to content
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

pipx deletes unrelated executables from .local/bin when uninstalling #670

Closed
jonapich opened this issue Apr 14, 2021 · 2 comments · Fixed by #672
Closed

pipx deletes unrelated executables from .local/bin when uninstalling #670

jonapich opened this issue Apr 14, 2021 · 2 comments · Fixed by #672

Comments

@jonapich
Copy link

Describe the bug
I am using coveo-stew which imports poetry. Even though pipx install coveo-stew does not create a .local/bin/poetry.exe, running pipx uninstall coveo-stew will delete .local/bin/poetry.exe if it exists.

How to reproduce

  1. run pipx install coveo-stew in a pipx that doesn't have poetry
  2. Look in the .local/bin folder; there is no poetry exec (it's in .local/pipx/venvs/etc; that's OK)
  3. run pipx install poetry
  4. The poetry.exe executable is created in .local/bin
  5. run pipx uninstall coveo-stew
  6. pipx deletes the poetry.exe file from .local/bin 😱

Expected behavior
Executables should not be deleted unless they directly belong to the project.

@itsayellow
Copy link
Contributor

I think this is related to: #564 which was supposed to be fixed by #650. #650 has not been released yet.
BUT! Even with the unreleased code this bug still exists ☹️

I just tried this, and sadly uninstalling coveo-stew has so many dependencies that pipx incorrectly deletes a ton of useful executables when it is uninstalled, besides poetry.exe.

This is an excellent test case, I'm not sure at the moment why #650 didn't fix this, but I will dig in to find out.

@itsayellow
Copy link
Contributor

Ah the problem is I fixed _get_exposed_app_paths_for_package() but unfortunately pipx uninstall doesn't use that function, it uses largely duplicate code that has not been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants