mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-08-15 20:46:01 +08:00
Adding check for cache paths' existence.
This commit is contained in:
parent
1e0f6285e5
commit
da52b35800
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…
x
Reference in New Issue
Block a user