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};
 }