Skip to content

Commit

Permalink
imitate problem pypy
Browse files Browse the repository at this point in the history
  • Loading branch information
dsame committed Sep 29, 2022
1 parent 1f081fb commit 44c9e5d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions dist/setup/index.js
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/install-pypy.ts
Expand Up @@ -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(
Expand Down

0 comments on commit 44c9e5d

Please sign in to comment.