Skip to content

Commit 55aad42

Browse files
Update error message for no dependencies to cache (#968)
1 parent 0b93645 commit 55aad42

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/cache-save/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -81165,7 +81165,7 @@ function saveCache(packageManager) {
8116581165
const cachePaths = JSON.parse(cachePathState);
8116681166
core.debug(`paths for caching are ${cachePaths.join(', ')}`);
8116781167
if (!isCacheDirectoryExists(cachePaths)) {
81168-
throw new Error(`Cache folder path is retrieved for ${packageManager} but doesn't exist on disk: ${cachePaths.join(', ')}`);
81168+
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.`);
8116981169
}
8117081170
const primaryKey = core.getState(cache_distributor_1.State.STATE_CACHE_PRIMARY_KEY);
8117181171
const matchedKey = core.getState(cache_distributor_1.State.CACHE_MATCHED_KEY);

src/cache-save.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ async function saveCache(packageManager: string) {
4141
throw new Error(
4242
`Cache folder path is retrieved for ${packageManager} but doesn't exist on disk: ${cachePaths.join(
4343
', '
44-
)}`
44+
)}. This likely indicates that there are no dependencies to cache. Consider removing the cache step if it is not needed.`
4545
);
4646
}
4747

0 commit comments

Comments
 (0)