mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-01-04 02:32:54 +08:00
update error handling abort
This commit is contained in:
parent
c119fcd773
commit
78ed49ff88
@ -50,10 +50,11 @@ async function streamExtract(url: string, directory: string): Promise<void> {
|
|||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
response.readableStreamBody
|
response.readableStreamBody
|
||||||
?.pipe(unzip.Extract({path: directory}))
|
?.on('error', reject)
|
||||||
.on('close', resolve)
|
|
||||||
.on('error', reject)
|
|
||||||
.on('aborted', reject)
|
.on('aborted', reject)
|
||||||
|
.pipe(unzip.Extract({path: directory}))
|
||||||
|
.on('error', reject)
|
||||||
|
.on('close', resolve)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user