Merge branch 'main' into v-dmshib/add-check-latest

This commit is contained in:
Dmitry Shibanov 2022-05-24 10:30:49 +02:00
commit ea1d6e985c
6 changed files with 54 additions and 25 deletions

8
dist/setup/index.js vendored
View file

@ -5591,7 +5591,7 @@ const os = __importStar(__webpack_require__(87));
const cache_factory_1 = __webpack_require__(633);
const utils_1 = __webpack_require__(163);
function isPyPyVersion(versionSpec) {
return versionSpec.startsWith('pypy-');
return versionSpec.startsWith('pypy');
}
function cacheDependencies(cache, pythonVersion) {
return __awaiter(this, void 0, void 0, function* () {
@ -52320,8 +52320,12 @@ function findPyPyToolCache(pythonVersion, pypyVersion, architecture) {
exports.findPyPyToolCache = findPyPyToolCache;
function parsePyPyVersion(versionSpec) {
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.");
throw new Error("Invalid 'version' property for PyPy. PyPy version should be specified as 'pypy<python-version>' or 'pypy-<python-version>'. See README for examples and documentation.");
}
const pythonVersion = versions[1];
let pypyVersion;