From 56d358493b02d27d77fc7a50178ff9c439c2051d Mon Sep 17 00:00:00 2001
From: Alexey <1337kwiz@gmail.com>
Date: Sun, 3 Apr 2022 20:41:15 +0300
Subject: [PATCH] Update cache-distributor.ts

---
 src/cache-distributions/cache-distributor.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/cache-distributions/cache-distributor.ts b/src/cache-distributions/cache-distributor.ts
index 4aaba033..f24c78da 100644
--- a/src/cache-distributions/cache-distributor.ts
+++ b/src/cache-distributions/cache-distributor.ts
@@ -45,13 +45,13 @@ abstract class CacheDistributor {
   }
 
   public handleMatchResult(matchedKey: string | undefined, primaryKey: string) {
-    if (matchedKey == primaryKey) {
+    if (matchedKey) {
       core.saveState(State.CACHE_MATCHED_KEY, matchedKey);
       core.info(`Cache restored from key: ${matchedKey}`);
     } else {
       core.info(`${this.packageManager} cache is not found`);
     }
-    core.setOutput('cache-hit', Boolean(matchedKey));
+    core.setOutput('cache-hit', matchedKey === primaryKey);
   }
 }