diff --git a/dist/setup/index.js b/dist/setup/index.js
index 291a6a12..88765443 100644
--- a/dist/setup/index.js
+++ b/dist/setup/index.js
@@ -73569,8 +73569,7 @@ function queryDistForMatch(versionSpec, arch = os_1.default.arch(), nodeVersions
             }
         });
         // get the latest version that matches the version spec
-        let version = evaluateVersions(versions, versionSpec);
-        return version;
+        return evaluateVersions(versions, versionSpec);
     });
 }
 exports.queryDistForMatch = queryDistForMatch;
diff --git a/src/installer.ts b/src/installer.ts
index fa86711f..cb682698 100644
--- a/src/installer.ts
+++ b/src/installer.ts
@@ -512,8 +512,7 @@ export async function queryDistForMatch(
   });
 
   // get the latest version that matches the version spec
-  let version = evaluateVersions(versions, versionSpec);
-  return version;
+  return evaluateVersions(versions, versionSpec);
 }
 
 export async function getVersionsFromDist(