1
0
Fork 0

Adding check for cache paths' existence.

pull/1097/head
Sankalp Kotewar 2022-05-22 10:09:13 +00:00 committed by GitHub
parent 1e0f6285e5
commit da52b35800
1 changed files with 6 additions and 0 deletions

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,