mirror of https://github.com/actions/toolkit
restoreCache only cleanup in finally if archivePath is set
parent
1fe633e27c
commit
5c8d5f1e26
|
@ -142,6 +142,7 @@ export async function restoreCache(
|
|||
core.warning(`Failed to restore: ${(error as Error).message}`)
|
||||
}
|
||||
} finally {
|
||||
if (archivePath) {
|
||||
// Try to delete the archive to save space
|
||||
try {
|
||||
await utils.unlinkFile(archivePath)
|
||||
|
@ -149,6 +150,7 @@ export async function restoreCache(
|
|||
core.debug(`Failed to delete archive: ${error}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return undefined
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue