mirror of
https://github.com/actions/setup-python.git
synced 2025-06-12 15:27:13 +02:00
Add check-latest functionality (#406)
This commit is contained in:
@ -19,11 +19,13 @@ import {
|
||||
export async function installPyPy(
|
||||
pypyVersion: string,
|
||||
pythonVersion: string,
|
||||
architecture: string
|
||||
architecture: string,
|
||||
releases: IPyPyManifestRelease[] | undefined
|
||||
) {
|
||||
let downloadDir;
|
||||
|
||||
const releases = await getAvailablePyPyVersions();
|
||||
releases = releases ?? (await getAvailablePyPyVersions());
|
||||
|
||||
if (!releases || releases.length === 0) {
|
||||
throw new Error('No release was found in PyPy version.json');
|
||||
}
|
||||
@ -78,7 +80,7 @@ export async function installPyPy(
|
||||
return {installDir, resolvedPythonVersion, resolvedPyPyVersion};
|
||||
}
|
||||
|
||||
async function getAvailablePyPyVersions() {
|
||||
export async function getAvailablePyPyVersions() {
|
||||
const url = 'https://downloads.python.org/pypy/versions.json';
|
||||
const http: httpm.HttpClient = new httpm.HttpClient('tool-cache');
|
||||
|
||||
|
Reference in New Issue
Block a user