1
0
Fork 0

Add check to make sure archive has been created already

Co-authored-by: Josh Gross <joshmgross@github.com>
pull/1857/head
Bassem Dghaidi 2024-11-14 15:49:02 +01:00 committed by GitHub
parent 555b03f6fd
commit 68ab87caa2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -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}`)
} }