about summary refs log tree commit diff
path: root/editors/code/src
diff options
context:
space:
mode:
authorVeetaha <gerzoh1@gmail.com>2020-02-10 23:12:20 +0200
committerVeetaha <gerzoh1@gmail.com>2020-02-10 23:12:20 +0200
commit78ee964f7cb289d63be3a6d9573dc65b15c2fd2a (patch)
tree440807ebed2a8ac99960b9abafe414d041789350 /editors/code/src
parentf8d6d6f23bfb15021be91031ba983da19f0d3ada (diff)
downloadrust-78ee964f7cb289d63be3a6d9573dc65b15c2fd2a.tar.gz
rust-78ee964f7cb289d63be3a6d9573dc65b15c2fd2a.zip
vscode: fix ebusy error on windows
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/installation/download_file.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/editors/code/src/installation/download_file.ts b/editors/code/src/installation/download_file.ts
index b51602ef9fc..fe356c39d6d 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))
     );
 }