1
0
mirror of https://github.com/actions/setup-python synced 2024-11-30 21:22:28 +08:00

Compare commits

...

3 Commits

Author SHA1 Message Date
Nathan Wagner
64c34e8263
Merge ae66cc3fdf into 55aad42e46 2024-11-05 15:15:34 -05:00
aparnajyothi-y
55aad42e46
Update error message for no dependencies to cache (#968) 2024-11-04 19:27:40 -06:00
nathan wagner
ae66cc3fdf throwing an error when the github API response is a JSON object. 2024-09-17 15:26:45 -04:00
3 changed files with 7 additions and 3 deletions

View File

@ -81165,7 +81165,7 @@ function saveCache(packageManager) {
const cachePaths = JSON.parse(cachePathState); const cachePaths = JSON.parse(cachePathState);
core.debug(`paths for caching are ${cachePaths.join(', ')}`); core.debug(`paths for caching are ${cachePaths.join(', ')}`);
if (!isCacheDirectoryExists(cachePaths)) { 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 primaryKey = core.getState(cache_distributor_1.State.STATE_CACHE_PRIMARY_KEY);
const matchedKey = core.getState(cache_distributor_1.State.CACHE_MATCHED_KEY); const matchedKey = core.getState(cache_distributor_1.State.CACHE_MATCHED_KEY);

4
dist/setup/index.js vendored
View File

@ -10063,7 +10063,11 @@ function getManifestFromRepo(owner, repo, auth, branch = 'master') {
core.debug('Invalid json'); core.debug('Invalid json');
} }
} }
if (!releases.hasOwnProperty('documentation_url')){
return releases; return releases;
}else{
throw new Error ('github API rate limiting response in JSON format')
}
}); });
} }
exports.getManifestFromRepo = getManifestFromRepo; exports.getManifestFromRepo = getManifestFromRepo;

View File

@ -41,7 +41,7 @@ async function saveCache(packageManager: string) {
throw new Error( throw new Error(
`Cache folder path is retrieved for ${packageManager} but doesn't exist on disk: ${cachePaths.join( `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.`
); );
} }