From 78ee964f7cb289d63be3a6d9573dc65b15c2fd2a Mon Sep 17 00:00:00 2001 From: Veetaha Date: Mon, 10 Feb 2020 23:12:20 +0200 Subject: vscode: fix ebusy error on windows --- editors/code/src/installation/download_file.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/editors/code/src/installation/download_file.ts b/editors/code/src/installation/download_file.ts index b51602ef9..fe356c39d 100644 --- a/editors/code/src/installation/download_file.ts +++ b/editors/code/src/installation/download_file.ts @@ -27,8 +27,7 @@ export async function downloadFile( readBytes += chunk.length; onProgress(readBytes, totalBytes); }) - .on("end", resolve) .on("error", reject) - .pipe(fs.createWriteStream(destFilePath)) + .pipe(fs.createWriteStream(destFilePath).on("close", resolve)) ); } -- cgit v1.2.3