diff --git a/packages/artifact/src/internal/download-http-client.ts b/packages/artifact/src/internal/download-http-client.ts index 7fb06a4b..bd409ebb 100644 --- a/packages/artifact/src/internal/download-http-client.ts +++ b/packages/artifact/src/internal/download-http-client.ts @@ -223,6 +223,7 @@ export class DownloadHttpClient { const resetDestinationStream = async ( fileDownloadPath: string ): Promise => { + destinationStream.close() await rmFile(fileDownloadPath) destinationStream = fs.createWriteStream(fileDownloadPath) }