From f8d15403f88bbdb32725eba97875dfe4930f741f Mon Sep 17 00:00:00 2001
From: mattip <matti.picus@gmail.com>
Date: Mon, 9 Nov 2020 15:23:32 +0200
Subject: [PATCH] version is a string

---
 dist/index.js      | 2 +-
 src/find-python.ts | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dist/index.js b/dist/index.js
index 6c7f8462..7033415f 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -6718,7 +6718,7 @@ function binDir(installDir) {
 // For example, PyPy 7.3.2 contains Python 2.7, 3.6, and 3.7-alpha.
 // We only care about the Python version, so we don't use the PyPy version for the tool cache.
 function usePyPy(version, architecture) {
-    const findPyPy = tc.find.bind(undefined, 'PyPy', version.toString());
+    const findPyPy = tc.find.bind(undefined, 'PyPy', version);
     let installDir = findPyPy(architecture);
     if (!installDir && IS_WINDOWS) {
         // PyPy only precompiles binaries for x86, but the architecture parameter defaults to x64.
diff --git a/src/find-python.ts b/src/find-python.ts
index 7e2074ed..889f4403 100644
--- a/src/find-python.ts
+++ b/src/find-python.ts
@@ -38,7 +38,7 @@ function binDir(installDir: string): string {
 // For example, PyPy 7.3.2 contains Python 2.7, 3.6, and 3.7-alpha.
 // We only care about the Python version, so we don't use the PyPy version for the tool cache.
 function usePyPy(version: string, architecture: string): InstalledVersion {
-  const findPyPy = tc.find.bind(undefined, 'PyPy', version.toString());
+  const findPyPy = tc.find.bind(undefined, 'PyPy', version);
   let installDir: string | null = findPyPy(architecture);
 
   if (!installDir && IS_WINDOWS) {
@@ -189,12 +189,12 @@ export async function findPythonVersion(
   switch (version.toUpperCase()) {
     /* TODO: extract this into a function */
     case 'PYPY2':
-      return usePyPy(2, architecture);
+      return usePyPy('2', architecture);
     case 'PYPY3.6':
-      return usePyPy(3.6, architecture);
+      return usePyPy('3.6', architecture);
     case 'PYPY3':
     case 'PYPY3.7':
-      return usePyPy(3.7, architecture);
+      return usePyPy('3.7', architecture);
     default:
       return await useCpythonVersion(version, architecture);
   }