diff --git a/src/internal/download-http-client.ts b/src/internal/download-http-client.ts index 7fb06a4..bd409eb 100644 --- a/src/internal/download-http-client.ts +++ b/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) }