mirror of
https://github.com/actions/toolkit
synced 2025-05-09 00:22:56 +00:00
Adding check for cache paths' existence.
This commit is contained in:
parent
1e0f6285e5
commit
da52b35800
1 changed files with 6 additions and 0 deletions
6
packages/cache/src/cache.ts
vendored
6
packages/cache/src/cache.ts
vendored
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue