Add some more logging

This commit is contained in:
Daniel Kennedy
2026-01-29 14:11:37 -05:00
parent 4d7db58d4c
commit 3bd9536400
2 changed files with 17 additions and 7 deletions
+10 -5
View File
@@ -17,11 +17,16 @@ console.log(`Restoring cache with key: ${key}`)
console.log(`Paths: ${paths.join(', ')}`)
console.log(`Using Azure SDK: ${options.useAzureSdk}`)
const restoredKey = await cache.restoreCache(paths, key, [], options)
try {
const restoredKey = await cache.restoreCache(paths, key, [], options)
if (restoredKey) {
console.log(`Cache restored with key: ${restoredKey}`)
} else {
console.error('Cache not found')
if (restoredKey) {
console.log(`Cache restored with key: ${restoredKey}`)
} else {
console.error('Cache not found')
process.exit(1)
}
} catch (error) {
console.error('Error restoring cache:', error)
process.exit(1)
}
+7 -2
View File
@@ -15,5 +15,10 @@ const paths = ['test-cache', '~/test-cache']
console.log(`Saving cache with key: ${key}`)
console.log(`Paths: ${paths.join(', ')}`)
const cacheId = await cache.saveCache(paths, key)
console.log(`Cache saved with ID: ${cacheId}`)
try {
const cacheId = await cache.saveCache(paths, key)
console.log(`Cache saved with ID: ${cacheId}`)
} catch (error) {
console.error('Error saving cache:', error)
process.exit(1)
}