Commit 9b05f65
authored
Recreate venv if python interpreter is missing (#216)
This fixes a bug where a cached venv might become broken due to python being upgraded and
tox was unable to recreate it:
```
error: Failed to inspect Python interpreter from active virtual environment at `.tox/py314/bin/python3`
Caused by: Broken symlink at `.tox/py314/bin/python3`, was the underlying Python interpreter removed?
hint: Consider recreating the environment (e.g., with `uv venv`)
py314: exit 2 (0.01 seconds) /home/runner/work/ansible-lint/ansible-lint> .tox/.tox/bin/uv pip install --reinstall --no-deps ansible-lint@/home/runner/work/ansible-lint/ansible-lint/.tox/.tmp/package/2/ansible_lint-25.6.2.dev4-0.editable-py3-none-any.whl pid=2959
```
See: https://github.com/ansible/ansible-lint/actions/runs/15822605275/job/44605268272?pr=46371 parent d9027e8 commit 9b05f65
2 files changed
+32
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
90 | 96 | | |
91 | 97 | | |
92 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
0 commit comments