Skip to content

Commit 37c9414

Browse files
committed
Use async appendFile
1 parent 6cf351f commit 37c9414

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

extensions/ql-vscode/src/remote-queries/variant-analysis-results-manager.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
import {
2-
appendFileSync,
3-
pathExists,
4-
mkdir,
5-
outputJson,
6-
readJson,
7-
} from "fs-extra";
1+
import { appendFile, pathExists, mkdir, outputJson, readJson } from "fs-extra";
82
import fetch from "node-fetch";
93
import { EOL } from "os";
104
import { join } from "path";
@@ -98,7 +92,7 @@ export class VariantAnalysisResultsManager extends DisposableObject {
9892
const response = await fetch(repoTask.artifactUrl);
9993
let amountDownloaded = 0;
10094
for await (const chunk of response.body) {
101-
appendFileSync(zipFilePath, Buffer.from(chunk));
95+
await appendFile(zipFilePath, Buffer.from(chunk));
10296
amountDownloaded += chunk.length;
10397
await onDownloadPercentageChanged(
10498
Math.floor((amountDownloaded / response.size) * 100),

0 commit comments

Comments
 (0)