-
Notifications
You must be signed in to change notification settings - Fork 446
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
reinstall
is destructive when misused with local source directory
#1324
Comments
reinstall
is destructive when misused with local source directory
Not actually a path, but the name of a pipx-installed package from which a corresponding venv directory name is created. Line 76 in 9ae4134
Let me reproduce this further.
Sorry to hear that. |
Ohhhhhh man! Goodbye not-pushed-anywhere year-old repo. Recovered three files that were open in my editor when I ran the command. That's a gut punch. I'm used to thinking "even if i accidentally delete files, git has my back" - not when the whole repo goes. Guess I've been around the block enough to know that if there's not a copy on another computer, it's not safe. Agreed with OP about misconstruing the purpose of the I'd somehow installed my app using the wrong Python, so I was trying to fix it with
So first I tried
so I dropped the
and that's all she wrote! I haven't fully digested #1329 because I'm still kind of preoccupied with data recovery, but I think it makes it an error to call |
…red from lost project) I completely lost the original project as described in this comment :( pypa/pipx#1324 (comment)
pipx version 1.5.0
Describe the bug
I have a package installed with pipx, and I wanted to reinstall it from a local source repository. I ran
thinking that it would do something equivalent to
Instead, it deleted the file tree at
{absolute-path-to-repo}
.From this experience, I have inferred that I have misunderstood the intended functionality and arguments of the
reinstall
command. (I'm inferring that reinstall accepts a path to a package's pipx virtual environment, rather than a path to package source.) However, I feel like this is an easy mistake to make, and the destructive side effect of this performing this action seems really bad. I did in fact lose some work that was only in my local git repository.How to reproduce
pipx reinstall
with an absolute path to that directorypipx reinstall $(pwd)/testdir
testdir/
.Expected behavior
pipx reinstall
should not accept a local file path as an argument to prevent misuse. Or if this is actually desired functionality, there should more checks in place to ensure that it is intentional and actually a path to a pipx virtual environment.The text was updated successfully, but these errors were encountered: