1
0
Fork 0
mirror of https://github.com/actions/setup-python.git synced 2024-12-21 20:04:55 +00:00

Update error message for no dependencies to cache (#968)

This commit is contained in:
aparnajyothi-y 2024-11-05 06:57:40 +05:30 committed by GitHub
parent 0b93645e9f
commit 55aad42e46
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -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);

View file

@ -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.`
);
}