mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-21 09:58:05 +08:00
Close destination steam before reject
Co-authored-by: Chris Sidi <hashtagchris@github.com>
This commit is contained in:
@@ -315,16 +315,17 @@ export class DownloadHttpClient {
|
|||||||
core.error(
|
core.error(
|
||||||
`An error occurred while attempting to read the response stream`
|
`An error occurred while attempting to read the response stream`
|
||||||
)
|
)
|
||||||
reject(error)
|
|
||||||
gunzip.close()
|
gunzip.close()
|
||||||
|
destinationStream.close()
|
||||||
|
reject(error)
|
||||||
})
|
})
|
||||||
.pipe(gunzip)
|
.pipe(gunzip)
|
||||||
.on('error', error => {
|
.on('error', error => {
|
||||||
core.error(
|
core.error(
|
||||||
`An error occurred while attempting to decompress the response stream`
|
`An error occurred while attempting to decompress the response stream`
|
||||||
)
|
)
|
||||||
reject(error)
|
|
||||||
destinationStream.close()
|
destinationStream.close()
|
||||||
|
reject(error)
|
||||||
})
|
})
|
||||||
.pipe(destinationStream)
|
.pipe(destinationStream)
|
||||||
.on('close', () => {
|
.on('close', () => {
|
||||||
@@ -342,8 +343,8 @@ export class DownloadHttpClient {
|
|||||||
core.error(
|
core.error(
|
||||||
`An error occurred while attempting to read the response stream`
|
`An error occurred while attempting to read the response stream`
|
||||||
)
|
)
|
||||||
reject(error)
|
|
||||||
destinationStream.close()
|
destinationStream.close()
|
||||||
|
reject(error)
|
||||||
})
|
})
|
||||||
.pipe(destinationStream)
|
.pipe(destinationStream)
|
||||||
.on('close', () => {
|
.on('close', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user