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

Update *Edit this page* link #761

Merged
merged 2 commits into from Jan 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions mkdocs.yml
Expand Up @@ -8,6 +8,7 @@ google_analytics:
- 'auto'
repo_name: pypa/pipx
repo_url: https://github.com/pypa/pipx
edit_uri: edit/main/docs/

nav:
- Home: "index.md"
Expand Down
8 changes: 6 additions & 2 deletions src/pipx/commands/reinstall.py
Expand Up @@ -28,10 +28,14 @@ def reinstall(
return EXIT_CODE_REINSTALL_VENV_NONEXISTENT

try:
# use PurePath.relative_to in a try block instead
# of PurePath.is_relative_to, for python 3.6-3.8 compatability
Path(python).relative_to(venv_dir)
python_relative_to_venv_dir = True
except ValueError:
pass
else:
python_relative_to_venv_dir = False

if python_relative_to_venv_dir:
Comment on lines +31 to +38
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change seems unrelated, what happened here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reverted the PR to avoid merging this. Please open a new PR and keep the change set scopped to the PR description.

print(
f"{error} Error, the python executable would be deleted!",
"Change it using the --python option or PIPX_DEFAULT_PYTHON environment variable.",
Expand Down