1
0
Fork 0
mirror of https://github.com/actions/toolkit synced 2025-05-09 16:43:02 +00:00

Adding check for cache paths' existence.

This commit is contained in:
Sankalp Kotewar 2022-05-22 10:09:13 +00:00 committed by GitHub
parent 1e0f6285e5
commit da52b35800

View file

@ -158,6 +158,12 @@ export async function saveCache(
core.debug('Cache Paths:') core.debug('Cache Paths:')
core.debug(`${JSON.stringify(cachePaths)}`) core.debug(`${JSON.stringify(cachePaths)}`)
if(cachePaths.length === 0){
throw new ValidationError(
`Path Validation Error: Path(s) specified in the action do not exist, hence no cache is being saved.`)
}
const archiveFolder = await utils.createTempDirectory() const archiveFolder = await utils.createTempDirectory()
const archivePath = path.join( const archivePath = path.join(
archiveFolder, archiveFolder,