vscode: fix ebusy error on windows

This commit is contained in:
Veetaha 2020-02-10 23:12:20 +02:00
parent f8d6d6f23b
commit 78ee964f7c

View file

@ -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))
);
}