Add some more logging
This commit is contained in:
+5
@@ -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
@@ -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)
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user