diff --git a/mkdocs.yml b/mkdocs.yml index bdd1256d6c..52034abee8 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -8,7 +8,6 @@ google_analytics: - 'auto' repo_name: pypa/pipx repo_url: https://github.com/pypa/pipx -edit_uri: edit/main/docs/ nav: - Home: "index.md" diff --git a/src/pipx/commands/reinstall.py b/src/pipx/commands/reinstall.py index 177fddb318..fc22d5bd2c 100644 --- a/src/pipx/commands/reinstall.py +++ b/src/pipx/commands/reinstall.py @@ -28,14 +28,10 @@ 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: - python_relative_to_venv_dir = False - - if python_relative_to_venv_dir: + pass + else: print( f"{error} Error, the python executable would be deleted!", "Change it using the --python option or PIPX_DEFAULT_PYTHON environment variable.",