diff --git a/packages/cache/src/cache.ts b/packages/cache/src/cache.ts index 86dd60c8..e5b5f6a4 100644 --- a/packages/cache/src/cache.ts +++ b/packages/cache/src/cache.ts @@ -158,6 +158,12 @@ export async function saveCache( core.debug('Cache Paths:') 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 archivePath = path.join( archiveFolder,