Change missing cache directory error to warning (#1182)

* update error to warning when no dependency to cache

* updated the return
This commit is contained in:
aparnajyothi-y 2025-08-26 08:15:55 +05:30 committed by GitHub
parent 9322b3ca74
commit f62a0e252f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -38,11 +38,12 @@ async function saveCache(packageManager: string) {
core.debug(`paths for caching are ${cachePaths.join(', ')}`);
if (!isCacheDirectoryExists(cachePaths)) {
throw new Error(
core.warning(
`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.`
);
return;
}
const primaryKey = core.getState(State.STATE_CACHE_PRIMARY_KEY);