Skip to content

Commit 1023a93

Browse files
authored
fix: close file stream when error in httpExecutor (#7094)
1 parent b363bcd commit 1023a93

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/famous-ways-cry.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"builder-util-runtime": patch
3+
"builder-util": patch
4+
---
5+
6+
fix: close file stream when error

packages/builder-util-runtime/src/httpExecutor.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@ function configurePipes(options: DownloadCallOptions, response: IncomingMessage)
485485
let lastStream = response
486486
for (const stream of streams) {
487487
stream.on("error", (error: Error) => {
488+
fileOut.close()
488489
if (!options.options.cancellationToken.cancelled) {
489490
options.callback(error)
490491
}

0 commit comments

Comments
 (0)