From 19fb37dbea9057ba53dd9e01fa1e6fd46825c0bf Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Sun, 3 Apr 2022 00:32:02 +0500 Subject: [PATCH] Move setOutput to findPyPyVersion --- dist/setup/index.js | 2 +- src/find-pypy.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index d6a5c9c8..89dc38af 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -2080,6 +2080,7 @@ function findPyPyVersion(versionSpec, architecture) { core.exportVariable('pythonLocation', pythonLocation); core.addPath(pythonLocation); core.addPath(_binDir); + core.setOutput('python-version', 'pypy' + resolvedPyPyVersion.trim()); return { resolvedPyPyVersion, resolvedPythonVersion }; }); } @@ -2105,7 +2106,6 @@ function findPyPyToolCache(pythonVersion, pypyVersion, architecture) { if (!installDir) { core.info(`PyPy version ${pythonVersion} (${pypyVersion}) was not found in the local cache`); } - core.setOutput('python-version', 'pypy' + resolvedPyPyVersion.trim()); return { installDir, resolvedPythonVersion, resolvedPyPyVersion }; } exports.findPyPyToolCache = findPyPyToolCache; diff --git a/src/find-pypy.ts b/src/find-pypy.ts index 396f631f..75b6abb0 100644 --- a/src/find-pypy.ts +++ b/src/find-pypy.ts @@ -52,6 +52,7 @@ export async function findPyPyVersion( core.exportVariable('pythonLocation', pythonLocation); core.addPath(pythonLocation); core.addPath(_binDir); + core.setOutput('python-version', 'pypy' + resolvedPyPyVersion.trim()); return {resolvedPyPyVersion, resolvedPythonVersion}; } @@ -90,7 +91,6 @@ export function findPyPyToolCache( ); } - core.setOutput('python-version', 'pypy' + resolvedPyPyVersion.trim()); return {installDir, resolvedPythonVersion, resolvedPyPyVersion}; }