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
+5
View File
@@ -17,6 +17,7 @@ console.log(`Restoring cache with key: ${key}`)
console.log(`Paths: ${paths.join(', ')}`) console.log(`Paths: ${paths.join(', ')}`)
console.log(`Using Azure SDK: ${options.useAzureSdk}`) console.log(`Using Azure SDK: ${options.useAzureSdk}`)
try {
const restoredKey = await cache.restoreCache(paths, key, [], options) const restoredKey = await cache.restoreCache(paths, key, [], options)
if (restoredKey) { if (restoredKey) {
@@ -25,3 +26,7 @@ if (restoredKey) {
console.error('Cache not found') console.error('Cache not found')
process.exit(1) process.exit(1)
} }
} catch (error) {
console.error('Error restoring cache:', error)
process.exit(1)
}
+5
View File
@@ -15,5 +15,10 @@ const paths = ['test-cache', '~/test-cache']
console.log(`Saving cache with key: ${key}`) console.log(`Saving cache with key: ${key}`)
console.log(`Paths: ${paths.join(', ')}`) console.log(`Paths: ${paths.join(', ')}`)
try {
const cacheId = await cache.saveCache(paths, key) const cacheId = await cache.saveCache(paths, key)
console.log(`Cache saved with ID: ${cacheId}`) console.log(`Cache saved with ID: ${cacheId}`)
} catch (error) {
console.error('Error saving cache:', error)
process.exit(1)
}