mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-03-15 20:12:35 +08:00
Add check to make sure archive has been created already
Co-authored-by: Josh Gross <joshmgross@github.com>
This commit is contained in:
4
packages/cache/src/cache.ts
vendored
4
packages/cache/src/cache.ts
vendored
@@ -296,7 +296,9 @@ async function restoreCachev2(
|
|||||||
throw new Error(`Failed to restore: ${error.message}`)
|
throw new Error(`Failed to restore: ${error.message}`)
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
await utils.unlinkFile(archivePath)
|
if (archivePath) {
|
||||||
|
await utils.unlinkFile(archivePath)
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.debug(`Failed to delete archive: ${error}`)
|
core.debug(`Failed to delete archive: ${error}`)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user