mirror of
https://github.com/actions/setup-python.git
synced 2026-01-20 04:38:56 +08:00
Merge branch 'main' into v-dmshib/add-check-latest
This commit is contained in:
commit
ea1d6e985c
6 changed files with 54 additions and 25 deletions
|
|
@ -126,9 +126,14 @@ export function findPyPyToolCache(
|
|||
export function parsePyPyVersion(versionSpec: string): IPyPyVersionSpec {
|
||||
const versions = versionSpec.split('-').filter(item => !!item);
|
||||
|
||||
if (/^(pypy)(.+)/.test(versions[0])) {
|
||||
let pythonVersion = versions[0].replace('pypy', '');
|
||||
versions.splice(0, 1, 'pypy', pythonVersion);
|
||||
}
|
||||
|
||||
if (versions.length < 2 || versions[0] != 'pypy') {
|
||||
throw new Error(
|
||||
"Invalid 'version' property for PyPy. PyPy version should be specified as 'pypy-<python-version>'. See README for examples and documentation."
|
||||
"Invalid 'version' property for PyPy. PyPy version should be specified as 'pypy<python-version>' or 'pypy-<python-version>'. See README for examples and documentation."
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import {getCacheDistributor} from './cache-distributions/cache-factory';
|
|||
import {isCacheFeatureAvailable} from './utils';
|
||||
|
||||
function isPyPyVersion(versionSpec: string) {
|
||||
return versionSpec.startsWith('pypy-');
|
||||
return versionSpec.startsWith('pypy');
|
||||
}
|
||||
|
||||
async function cacheDependencies(cache: string, pythonVersion: string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue