From 44c9e5dff749bcd53d2dc9f882e3d7c4d7633dff Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Thu, 29 Sep 2022 13:19:01 +0200 Subject: [PATCH] imitate problem pypy --- dist/setup/index.js | 8 +++++--- src/install-pypy.ts | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index 72bffa816..3436fd495 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -66489,13 +66489,15 @@ function installPyPy(pypyVersion, pythonVersion, architecture, releases) { if (!releases || releases.length === 0) { throw new Error('No release was found in PyPy version.json'); } - const releaseData = findRelease(releases, pythonVersion, pypyVersion, architecture); + const releaseData = findRelease(releases, pythonVersion, pypyVersion, architecture) || { foundAsset: true, resolvedPythonVersion: "2", resolvedPyPyVersion: "3" }; if (!releaseData || !releaseData.foundAsset) { - throw new Error(`PyPy version ${pythonVersion} (${pypyVersion}) with arch ${architecture} not found`); + // throw new Error( + // `PyPy version ${pythonVersion} (${pypyVersion}) with arch ${architecture} not found` + //); } const { foundAsset, resolvedPythonVersion, resolvedPyPyVersion } = releaseData; let downloadUrl = `${foundAsset.download_url}`; - core.info(`Downloading PyPy from "${downloadUrl}" ... will throw`); + core.info(`Downloading PyPy from "${downloadUrl}" ...`); try { throw new tc.HTTPError(403); const pypyPath = yield tc.downloadTool(downloadUrl); diff --git a/src/install-pypy.ts b/src/install-pypy.ts index 3a2744778..077fd7067 100644 --- a/src/install-pypy.ts +++ b/src/install-pypy.ts @@ -35,7 +35,7 @@ export async function installPyPy( pythonVersion, pypyVersion, architecture - ) || {foundAsset: true,resolvedPythonVersion: 2,resolvedPyPyVersion: 3}; + ) || {foundAsset: true,resolvedPythonVersion: "2",resolvedPyPyVersion: "3"}; if (!releaseData || !releaseData.foundAsset) { // throw new Error(