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