From 9084ed042c3c07a4520b13f67c32a1c9e7262bab Mon Sep 17 00:00:00 2001 From: Aparna Jyothi Date: Wed, 23 Oct 2024 15:38:29 +0530 Subject: [PATCH] Update error message for no dependencies to cache --- dist/cache-save/index.js | 2 +- src/cache-save.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/cache-save/index.js b/dist/cache-save/index.js index aa4501f9..2b22f4a7 100644 --- a/dist/cache-save/index.js +++ b/dist/cache-save/index.js @@ -81165,7 +81165,7 @@ function saveCache(packageManager) { const cachePaths = JSON.parse(cachePathState); core.debug(`paths for caching are ${cachePaths.join(', ')}`); if (!isCacheDirectoryExists(cachePaths)) { - throw new Error(`Cache folder path is retrieved for ${packageManager} but doesn't exist on disk: ${cachePaths.join(', ')}`); + throw new Error(`Cache folder path is retrieved for ${packageManager} but doesn't exist on disk: ${cachePaths.join(', ')}. This likely indicates that there are no dependencies to cache. Consider removing the cache step if it is not needed.`); } const primaryKey = core.getState(cache_distributor_1.State.STATE_CACHE_PRIMARY_KEY); const matchedKey = core.getState(cache_distributor_1.State.CACHE_MATCHED_KEY); diff --git a/src/cache-save.ts b/src/cache-save.ts index fbb481c1..4aec04e4 100644 --- a/src/cache-save.ts +++ b/src/cache-save.ts @@ -41,7 +41,7 @@ async function saveCache(packageManager: string) { throw new Error( `Cache folder path is retrieved for ${packageManager} but doesn't exist on disk: ${cachePaths.join( ', ' - )}` + )}. This likely indicates that there are no dependencies to cache. Consider removing the cache step if it is not needed.` ); }