mirror of https://github.com/actions/toolkit
Updated error message and null check
parent
cf5d2b8fac
commit
ba462956ea
|
@ -249,13 +249,11 @@ export async function downloadCacheStorageSDK(
|
||||||
|
|
||||||
try {
|
try {
|
||||||
downloadProgress.startDisplayTimer()
|
downloadProgress.startDisplayTimer()
|
||||||
const segmentTimeoutInMs =
|
const abortSignal = AbortController.timeout(
|
||||||
options.segmentTimeoutInMs === undefined
|
options.segmentTimeoutInMs || 3600000
|
||||||
? 3600000
|
)
|
||||||
: options.segmentTimeoutInMs
|
|
||||||
const abortSignal = AbortController.timeout(segmentTimeoutInMs)
|
|
||||||
abortSignal.addEventListener('abort', () => {
|
abortSignal.addEventListener('abort', () => {
|
||||||
core.warning('Cache download aborted, segment download timed out.')
|
core.warning('Aborting cache download as it exceeded the timeout.')
|
||||||
})
|
})
|
||||||
while (!downloadProgress.isDone()) {
|
while (!downloadProgress.isDone()) {
|
||||||
const segmentStart =
|
const segmentStart =
|
||||||
|
@ -277,7 +275,6 @@ export async function downloadCacheStorageSDK(
|
||||||
onProgress: downloadProgress.onProgress()
|
onProgress: downloadProgress.onProgress()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
fs.writeFileSync(fd, result)
|
fs.writeFileSync(fd, result)
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
|
Loading…
Reference in New Issue