mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-11-18 16:31:06 +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) => {
|
||||
response.readableStreamBody
|
||||
?.pipe(unzip.Extract({path: directory}))
|
||||
.on('close', resolve)
|
||||
.on('error', reject)
|
||||
?.on('error', reject)
|
||||
.on('aborted', reject)
|
||||
.pipe(unzip.Extract({path: directory}))
|
||||
.on('error', reject)
|
||||
.on('close', resolve)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user