We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b10a2df commit bce5811Copy full SHA for bce5811
src/extension/utils/runtime.ts
@@ -489,16 +489,8 @@ export class Runnable extends EventEmitter {
489
}
490
491
export async function getFileChecksum(file: string): Promise<string> {
492
- return new Promise((resolve, reject) => {
493
- const hash = crypto.createHash("md5");
494
- const stream = fs.createReadStream(file, { encoding: "utf8" });
495
- stream.once("error", (err) => reject(err));
496
- stream.once("end", () => {
497
- hash.end();
498
- resolve(hash.digest("hex"));
499
- });
500
- stream.pipe(hash);
501
+ const content = await fs.promises.readFile(file);
+ return crypto.createHash("md5").update(content).digest("hex");
502
503
504
async function doCompile(
0 commit comments