mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-08-19 16:19:12 +08:00
Updated error message and null check
This commit is contained in:
parent
cf5d2b8fac
commit
ba462956ea
11
packages/cache/src/internal/downloadUtils.ts
vendored
11
packages/cache/src/internal/downloadUtils.ts
vendored
@ -249,13 +249,11 @@ export async function downloadCacheStorageSDK(
|
||||
|
||||
try {
|
||||
downloadProgress.startDisplayTimer()
|
||||
const segmentTimeoutInMs =
|
||||
options.segmentTimeoutInMs === undefined
|
||||
? 3600000
|
||||
: options.segmentTimeoutInMs
|
||||
const abortSignal = AbortController.timeout(segmentTimeoutInMs)
|
||||
const abortSignal = AbortController.timeout(
|
||||
options.segmentTimeoutInMs || 3600000
|
||||
)
|
||||
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()) {
|
||||
const segmentStart =
|
||||
@ -277,7 +275,6 @@ export async function downloadCacheStorageSDK(
|
||||
onProgress: downloadProgress.onProgress()
|
||||
}
|
||||
)
|
||||
|
||||
fs.writeFileSync(fd, result)
|
||||
}
|
||||
} finally {
|
||||
|
Loading…
x
Reference in New Issue
Block a user