fix: warn instead of error when no python to cache (#762)

Fixes: #754
This commit is contained in:
Kevin Stillhammer
2026-02-06 16:00:33 +01:00
committed by GitHub
parent a3b3eaea92
commit 02182fa02a
4 changed files with 74 additions and 49 deletions

View File

@@ -199,6 +199,10 @@ By default, the Python install dir (`uv python dir` / `UV_PYTHON_INSTALL_DIR`) i
for the same reason that the dependency cache is pruned.
If you want to cache Python installs along with your dependencies, set the `cache-python` input to `true`.
Note that this only caches Python versions that uv actually installs into `UV_PYTHON_INSTALL_DIR`
(i.e. managed Python installs). If uv uses a system Python, there may be nothing to cache.
To force managed Python installs, set `UV_PYTHON_PREFERENCE=only-managed`.
```yaml
- name: Cache Python installs
uses: astral-sh/setup-uv@v7