diff --git a/__tests__/restore.test.ts b/__tests__/restore.test.ts index 446237c..2e84db5 100644 --- a/__tests__/restore.test.ts +++ b/__tests__/restore.test.ts @@ -304,7 +304,7 @@ test("restore with cache found for restore key", async () => { expect(setCacheHitOutputMock).toHaveBeenCalledWith(false); expect(infoMock).toHaveBeenCalledWith( - `Cache restored from key: ${restoreKey}` + `Cache restored from restore key: ${restoreKey}` ); expect(failedMock).toHaveBeenCalledTimes(0); }); diff --git a/src/restore.ts b/src/restore.ts index 0fa6333..48e6ff4 100644 --- a/src/restore.ts +++ b/src/restore.ts @@ -52,7 +52,7 @@ async function run(): Promise { const isExactKeyMatch = utils.isExactKeyMatch(primaryKey, cacheKey); utils.setCacheHitOutput(isExactKeyMatch); - core.info(`Cache restored from key: ${cacheKey}`); + core.info(`Cache restored from ${isExactKeyMatch ? '' : 'restore '}key: ${cacheKey}`); } catch (error) { if (error.name === cache.ValidationError.name) { throw error;