Add some more logging
This commit is contained in:
+10
-5
@@ -17,11 +17,16 @@ 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}`)
|
||||||
|
|
||||||
const restoredKey = await cache.restoreCache(paths, key, [], options)
|
try {
|
||||||
|
const restoredKey = await cache.restoreCache(paths, key, [], options)
|
||||||
|
|
||||||
if (restoredKey) {
|
if (restoredKey) {
|
||||||
console.log(`Cache restored with key: ${restoredKey}`)
|
console.log(`Cache restored with key: ${restoredKey}`)
|
||||||
} else {
|
} else {
|
||||||
console.error('Cache not found')
|
console.error('Cache not found')
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error restoring cache:', error)
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-2
@@ -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(', ')}`)
|
||||||
|
|
||||||
const cacheId = await cache.saveCache(paths, key)
|
try {
|
||||||
console.log(`Cache saved with ID: ${cacheId}`)
|
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)
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user