mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-07-07 12:11:34 +00:00
Fix cache keys for Python version ranges (#937)
## Summary - URL-encode the Python version component before adding it to the cache key - URL-encode the user-provided cache suffix for the same reason - Add cache key tests for Python ranges, comma-containing suffixes, and unchanged simple inputs Fixes #914 Refs: pi-session 019f3164-85e7-7817-bffd-501d89b3a1fd ## Tests - npm run all
This commit is contained in:
committed by
GitHub
parent
3cc3c11fdf
commit
17c398959b
4
dist/setup/index.cjs
generated
vendored
4
dist/setup/index.cjs
generated
vendored
@@ -90621,8 +90621,8 @@ async function computeKeys(inputs, pythonVersion) {
|
||||
if (cacheDependencyPathHash === "-") {
|
||||
cacheDependencyPathHash = "-no-dependency-glob";
|
||||
}
|
||||
const suffix = inputs.cacheSuffix ? `-${inputs.cacheSuffix}` : "";
|
||||
const version3 = pythonVersion ?? "unknown";
|
||||
const suffix = inputs.cacheSuffix ? `-${encodeURIComponent(inputs.cacheSuffix)}` : "";
|
||||
const version3 = encodeURIComponent(pythonVersion ?? "unknown");
|
||||
const platform2 = await getPlatform();
|
||||
const osNameVersion = getOSNameVersion();
|
||||
const pruned = inputs.pruneCache ? "-pruned" : "";
|
||||
|
||||
Reference in New Issue
Block a user