Skip to content

Commit

Permalink
Avoid recreation of virtualenv due to symlinks
Browse files Browse the repository at this point in the history
If people called tox alternating between `python3 -m tox` and `tox`,
they would endup triggering venv recreation, even if there was only
one python. We should always resolve symlinks to avoid such false
env invalidations.
  • Loading branch information
ssbarnea committed Dec 1, 2022
1 parent 6fe6e4d commit 5fa7eab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tox/tox_env/python/virtual_env/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def _get_python(self, base_python: list[str]) -> PythonInfo | None: # noqa: U10
version=interpreter.version,
is_64=(interpreter.architecture == 64),
platform=interpreter.platform,
extra={"executable": Path(interpreter.system_executable)},
extra={"executable": Path(interpreter.system_executable).resolve()},
)

def prepend_env_var_path(self) -> list[Path]:
Expand Down

0 comments on commit 5fa7eab

Please sign in to comment.